# springboot前后端分离后端模板 **Repository Path**: wangheran/springboot_template ## Basic Information - **Project Name**: springboot前后端分离后端模板 - **Description**: 整合 shiro druid cache knife4j pagehelper lombok 后端项目模板 - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2020-08-13 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # springboot前后端分离后端模板 **介绍** 整合 shiro druid redis cache [knife4j](https://doc.xiaominfo.com/guide/useful.html) pagehelper lombok [ElasticSearch](https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.x/java-rest-high-search.html) 后端项目模板 嵌入[hutool](https://www.hutool.cn/docs/index.html#/) 前端项目:[https://gitee.com/CC_like/vue_template](https://gitee.com/CC_like/vue_template) **软件架构** 此项目为前后端分离的后端模板,未使用分布式,微服务等架构 **常用工具说明** BaseServiceException 自定义异常 使用时直接传入错误信息即可,已做全局异常控制 工具类包含 uuid 雪花算法 redis jackson等可直接使用 **常用注解说明** spring-boot-starter-cache 相关注解 用于简化redis缓存 如需预防缓存击穿及穿透请自行编写 jackson 相关注解 lombok 相关注解 @Async("taskExecutor") 异步调用已经配置了线程池 使用时请用该注解 knife4j 相关注解 如不清楚可搜索 swagger2 shrio 相关注解 用于接口的权限控制 @NoRepeatSubmit(lockTime = 30) 放在接口方法上 禁止重复提交 lockTime 表示限制秒数 默认为 5 @LimitAnno lua限流 **定时任务** 请使用hutool-cron 可在config--cron.setting 中进行配置 注意:job类中,无法注入bean,可使用SpringContextUtil.getBean() 详情请看 [hutool-cron](https://www.hutool.cn/docs/#/cron/全局定时任务-CronUtil) **目录结构** ``` project |-- java |-- ... |-- TemplateApplication.java |-- common | |-- annotation | |-- aop | |-- constant | |-- enumerate | |-- exception | |-- job | |-- util |-- config |-- controller |-- entity |-- mapper |-- service |-- impl |-- resources |-- config |-- static ```