# 前言
简介:springboot-mapper-redis是一个基于Spring Boot & MyBatis & redis的maven种子系统,用于快速构建中小型API、RESTful API项目。
主要版本:springboot采用2.x版本、mybatis3.4X版本、通用mapper使用4.X版本
看完记得点赞噢~~~
# 文档说明
1、集成MyBatis、通用Mapper插件、PageHelper分页插件,实现单表业务零SQL,可以说学会使用这套架构将节约你百分之五十的开发时间!
2、集成Druid数据库连接池与监控,默认用户名admin、密码123456,用于监控业务系统的sql使用情况等
3、使用FastJsonHttpMessageConverter,提高JSON序列化速度,用于redis对象的转换等
4、提供基础方法基础服务的封装,对于单表的增删查改,包括多条件查询,分页查询都已经封装好,根据代码生成器生成对应的Model、Mapper、
MapperXML、Service、ServiceImpl、Controller等基础代码,另外,使用模板也有助于保持团队代码风格的统一
5、统一响应结果封装及生成工具、统一异常处理、简单的接口签名认证
6、使用redis作为系统的缓存架构
7、拦截器、过滤器、监听器等实现跨域、签名、token认证等
8、websocket的使用事例
9、定时器scheduling的使用
10、系统日志的记录,可根据日志级别,打印sql日志,用于快速线上定位问题
11、引入HuTool作为通用工具包
12、阿里云短信工具
13、itext进行pdf打印
14、邮件服务
15、乐观锁的使用
# 码上开始
1、clone项目
2、修改coreconstant里的常量
3、修改日志目录pom文件
4、修改你的项目名和常量名一样
5、尽情享用.......
# 参考技术文档
[通用Mapper文档](https://mapperhelper.github.io/docs/7.use330/)
[MyBatis查看官方中文文档 ](http://www.mybatis.org/mybatis-3/zh/index.html)
[MyBatis 分页插件 PageHelper](https://pagehelper.github.io/)
[Druid Spring Boot Starter](https://github.com/alibaba/druid/tree/master/druid-spring-boot-starter/)
[Fastjson](https://github.com/Alibaba/fastjson/wiki/%E9%A6%96%E9%A1%B5)
[前端参数签名怎么生成,建议使用 JWT](https://www.jianshu.com/p/576dbf44b2ae)
[Hutool](http://hutool.mydoc.io/)
[通用mapper更新地址]( https://github.com/abel533/Mapper/wiki/changelog)
# 开发建议
1、表名,建议使用小写,多个单词使用下划线拼接
2、Model内成员变量建议与表字段数量对应,如需扩展成员变量(比如连表查询)建议创建DTO,否则需在扩展的成员变量上加@Transient注解,详情见通用Mapper插件文档说明
3、建议业务失败直接使用ServiceException("message")抛出,由统一异常处理器来封装业务失败的响应结果,比如throw new ServiceException("该手机号已被注册"),会直接被封装为{"code":400,"message":"该手机号已被注册"}返回,无需自己处理,尽情抛出
3、需要工具类的话建议先从apache-commons-*、hutool和guava中找,实在没有再造轮子或引入类库,尽量精简项目
4、开发规范建议遵循阿里巴巴Java开发手册(最新版下载)
5、建议使用的eclipse里的api插件工具,生成统一风格文档,保证代码的规范性
# 特别感谢
框架是站在“巨人”的肩膀上诞生的,特别感谢通用mapper的原作者(@土豆lihengming),框架最初很多借鉴了他的种子框架,
尤其是代码生成部分,这部风自己只在其基础上做了些许修改,而其开源的通用mapper更是大大节约了我这种低端码农的开发工作量,
有更多的时间约妹打球啦哈哈哈哈。
经过一年多的项目实践,更新迭代了mapper版本,丰富了工具类和通用服务方法、引入了socket和阿里云短信、itexpdf工具、加入了redis缓存框架等;
#温馨提示
欢迎广大码农clone使用、水平有限,框架中如有不足还望轻喷,同时也欢迎大家积极贡献,打造一个更加完美的开源微服务框架!
[项目地址](https://github.com/actor-t/springboot-mapper-redis)
如有疑虑欢迎咨询qq:2411559022
### 来根烟抽抽
<div align=center><img width="400" height="400" src="https://github.com/actor-t/springboot-mapper-redis/blob/master/src/test/java/s/%E5%BE%AE%E4%BF%A1.jpg"/>
<img width="400" height="400" src="https://github.com/actor-t/springboot-mapper-redis/blob/master/src/test/java/s/%E6%94%AF%E4%BB%98%E5%AE%9D.jpg"/></div>
没有合适的资源?快使用搜索试试~ 我知道了~
springboot和redis以及通用mapper等的一个结合框架.zip
共305个文件
html:210个
java:57个
jpg:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 68 浏览量
2024-03-09
17:34:15
上传
评论
收藏 1.92MB ZIP 举报
温馨提示
springboot和redis以及通用mapper等的一个结合框架.zip
资源推荐
资源详情
资源评论
收起资源包目录
springboot和redis以及通用mapper等的一个结合框架.zip (305个子文件)
mvnw.cmd 5KB
stylesheet.css 13KB
controller.ftl 5KB
service-impl.ftl 948B
service.ftl 259B
.gitignore 292B
overview-tree.html 77KB
RedisUtil.html 62KB
index-17.html 34KB
index-7.html 32KB
User.html 32KB
AbstractService.html 30KB
package-tree.html 27KB
package-tree.html 24KB
RedisConfigProperties.html 22KB
CommonUtil.html 21KB
Result.html 20KB
Service.html 20KB
UserController.html 19KB
UserMapper.html 18KB
index-3.html 17KB
User.html 17KB
LoginController.html 16KB
AliyunSendSmsRequestBo.html 16KB
index-4.html 15KB
AliyunDysmsTemplateEnum.html 15KB
UserServiceImpl.html 15KB
AliyunDysmsServicelmp.html 15KB
ResultCode.html 14KB
CodeGenerator.html 14KB
constant-values.html 14KB
FileManageController.html 14KB
Mapper.html 14KB
IAliyunDysmsService.html 14KB
index-19.html 14KB
PictureController.html 14KB
FastJson2JsonRedisSerializer.html 14KB
SessionInterceptor.html 14KB
SingInterceptor.html 13KB
CommonConstant.html 13KB
index-1.html 13KB
WebMvcConfig.html 13KB
Result.html 13KB
CameHumpInterceptor.html 13KB
DigestUtil.html 12KB
ExportTextUtil.html 12KB
index-6.html 12KB
FileManageUtil.html 12KB
MybatisConfig.html 12KB
ResultGenerator.html 11KB
index-10.html 11KB
InterceptorConfigurerAdapter.html 11KB
ServletFilter.html 11KB
CorePager.html 11KB
index-11.html 11KB
package-use.html 11KB
SpringContextUtil.html 11KB
DruidConfig.html 11KB
index-14.html 10KB
SchedulingConfig.html 10KB
IUserService.html 10KB
index-16.html 10KB
CacheUtils.html 10KB
index-8.html 10KB
ContextListener.html 10KB
CacheConfig.html 10KB
RedisConfig.html 10KB
CoreConstant.html 10KB
ServiceException.html 9KB
package-use.html 9KB
WebSocketConfig.html 9KB
RedisKeyPrefix.html 9KB
UserProvider.html 9KB
DruidStatController.html 9KB
WeChat.html 9KB
PyxApplication.html 9KB
Service.html 9KB
PyxApplicationTests.html 9KB
AliyunSendSmsRequestBo.html 8KB
help-doc.html 8KB
index-9.html 8KB
index-21.html 8KB
package-summary.html 8KB
allclasses-frame.html 8KB
ResultCode.html 8KB
TableMapper.html 8KB
index-20.html 8KB
index-22.html 8KB
AliyunDysmsTemplateEnum.html 7KB
index-18.html 7KB
index.html 7KB
allclasses-noframe.html 7KB
overview-summary.html 7KB
index-5.html 7KB
package-summary.html 7KB
IAliyunDysmsService.html 7KB
package-tree.html 7KB
IUserService.html 7KB
index-15.html 6KB
AbstractService.html 6KB
共 305 条
- 1
- 2
- 3
- 4
资源评论
白如意i
- 粉丝: 6527
- 资源: 3230
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- travel 基于协同过滤算法的景点推荐系统.zip
- light room9.1.apk
- (单片机Protues入门笔记)单片机Proteus仿真软件入门笔记约80多页,内容图像并茂
- (单片机Proteus案例)基于80c51单片机的比赛计分器电路仿真实现
- 增强型51单片机(stc15系列)驱动ws2812彩灯模块库文件
- (单片机Protues案例)基于51单片机交通灯仿真实现
- 23种设计模式-C++实现.zip
- (单片机Protues案例)基于51单片机的频率计仿真实现
- (单片机Proteus案例)Proteus单片机仿真实例之键盘系列
- (单片机Proteus案例)Proteus单片机仿真实例之电机系列
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功