# bootman **Repository Path**: helllp/bootman ## Basic Information - **Project Name**: bootman - **Description**: 快速基于spring boot进行企业级应用的开发整合 - **Primary Language**: Java - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2018-01-04 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # bootman 快速基于spring boot进行企业级应用的开发整合 ## 开始 使用eclipse作为开发工具 包管理 me.helllp.bootman.core mvn archetype:generate -DgroupId=me.helllp.bootman -DartifactId=core -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false 配置.gitignore文件 生成基本的项目 ## 第一次提交 1. 完成基本框架搭建 2. 完成定制数据绑定,支持Enum 主要是解决枚举状态的绑定,比如:输入1表示男,0表示女,系统自动将输入解析为枚举类型 使用者需要做如下的工作:生成一个me.helllp.bootman.enums.SexEnum类 参考例子:me.helllp.bootman.logic.demo.web.EnumsController 3. 完成国际化的集成 国际化信息:src/main/resources/i18n/messages,通过spring.messages.basename进行的配置 使用LocaleMessageSourceService进行信息处理 参考例子:me.helllp.bootman.logic.demo.web.I18nController 4. 完成输入校验的集成,使用spring的信息处理 使用@Validated进行输入校验,BindingResult获取校验结果 演示如何进行分组校验 参考例子:me.helllp.bootman.logic.demo.web.InputCheckController 5. 集成Redis功能 me.helllp.bootman.config.redis.RedisDefine中设置了,默认的缓存时间为30秒 使用进行缓存的处理@Cacheable,@CacheEvict 参考例子:me.helllp.bootman.logic.demo.web.RedisController 6. 异常全局处理 重定向错误页,返回全部是JSON格式 @RestControllerAdvice 进行全局异常捕获 系统定义的错误码:me.helllp.bootman.common.result.ErrorCodeEnum 错误码对应的信息:RETURN_CORE_错误码 ## 第二次提交 1. 数据库连接池Druid 监控:http://localhost:8012/druid/ admin/111111 配置:me.helllp.bootman.config.mybatis.DruidConfig 2. 集成MyBatis自动代码生成 自动生成代码,[MyBatis Generator介绍](http://mbg.cndocs.ml/) [通用Mapper](http://www.mybatis.tk/) 使用方法:me.helllp.bootman.CreateMapper 配置文件位置:main\resources\generatorConfig.xml 生成文件位置: main\resources\mapper main\java\me\helllp\bootman\mapper main\java\me\helllp\bootman\model 3. MyBatis分页插件 me.helllp.bootman.config.mybatis.MyBatisConfig 参考例子:me.helllp.bootman.logic.demo.web.DbController 4. 日志设置 使用logback输出日志 ## 第三次提交 1. 生成权限相关的数据表 2. shiro权限控制,集成redis 参考例子:me.helllp.bootman.logic.demo.web.RedisController 3. 完成JWT的token集成,还有遗留的问题,比如异常的处理机制友好 参考例子:me.helllp.bootman.logic.common.web.SystemLoginController 4. 增加了分布式锁的实现,使用Redis me.helllp.bootman.utils.RedisLockUtil 5. 增加ZK的集成,使用Curator作为客户端,演示使用ZK进行分布式锁(重入,不可重入,读写,计数,珊栏等),选主 参考例子:me.helllp.bootman.logic.demo.web.CuratorController 6. 增加Websocket的实现 配置:me.helllp.bootman.config.websocket 服务实现:me.helllp.bootman.logic.demo.services.WebSocketServices 地址:http://localhost:8012/chat.html ## 第三次提交 1. [集成AdminLTE](https://github.com/almasaeed2010/AdminLTE)