6 Star 14 Fork 1

鲸渔/CC_Like项目管理 - 后端

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

springboot + shiro + mysql 前后端分离后端模板

介绍

JDK Spring Boot shiro LICENSE

star fork

包含常见插件 shiro druid redis cache redisson knife4j pagehelper lombok ElasticSearch hutool EasyExcel

本项目配合前端项目 CC_Like项目管理 - 前端 使用

项目说明

此项目为前后端分离的后端模板,未使用分布式,微服务等架构. 内容涵盖断点续传,秒传!

常用工具说明

BaseServiceException 自定义异常 使用时直接传入错误信息即可,已做全局异常控制

工具类包含 uuid 雪花算法 redis jackson等可直接使用

常用注解说明

spring-boot-starter-cache 相关注解 用于简化redis缓存 如需预防缓存击穿及穿透请自行编写

jackson 相关注解

lombok 相关注解

@Async("taskExecutor") 异步调用已经配置了线程池 使用时请用该注解

@Scheduled 定时任务,可结合@Async("taskExecutor")一起使用

knife4j 相关注解

shrio 相关注解 用于接口的权限控制

@NoRepeatSubmit(lockTime = 30) 放在方法上 禁止重复提交 lockTime 表示限制秒数 默认为 5

@TrafficLimit redis限流

@MultiRequestBody 将RequestBody解析到 单/多个参数中

@PostMapping("/testMultiRequestBody")
public JsonData testMultiRequestBody(@MultiRequestBody("key") String id,@MultiRequestBody String name){
		System.err.println(StrUtil.format("id : {} , name : {}",id,name));
		}

目录结构

project
|-- java
    |-- ...
        |-- TemplateApplication.java
        |-- common
        |   |-- annotation      注解
        |   |-- aop             切面
        |   |-- constant        常量
        |   |-- enumerate       枚举
        |   |-- exception       异常
        |   |-- job             异步
        |   |-- task            定时
        |   |-- util            工具
        |-- config              注解
        |-- controller          
        |-- entity
        |-- mapper
        |-- service
            |-- impl
|-- resources
    |-- config

注意

1.由于逻辑删除(假删除)与唯一索引的冲突问题,该系统内所有唯一索引都需要和deleted配置联合唯一索引.当deleted为0时表示未删除,非0时表示已删除.在进行删除操作时将deleted赋值为当前时间戳.

⬆ top

MIT License Copyright (c) 2020 痴痴爱编程 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

springboot + shiro + druid + mysql +redis 该项目为前后端分离的后端模板 用于搭配 <CC_Like项目管理 - 前端 >使用 内容还包含常用的插件 knife4j pagehelper lombok redisson elasticsearch hutool easyexcel 等 展开 收起
Java
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/CC_like/springboot_template.git
git@gitee.com:CC_like/springboot_template.git
CC_like
springboot_template
CC_Like项目管理 - 后端
master

搜索帮助