Go 43e02e38c2 fix(server): 调整依赖 3 years ago
..
data ca91ec6ff2 fix(all): 修复bug 3 years ago
gateway-api ca91ec6ff2 fix(all): 修复bug 3 years ago
tools 6d3177f474 fix(all): 更新bug 3 years ago
.gitignore 9d43a0a11a feat(server|admin): 后台设置相关完成 4 years ago
NotoSerifCJKsc-Bold.otf 664d55e516 fix(service): 修复错误 4 years ago
README.md 5567207f06 feat(server): 添加后端框架 4 years ago
build.gradle 43e02e38c2 fix(server): 调整依赖 3 years ago
dependencyDefine.gradle da898bdb83 feat(server): 测试环境监理 4 years ago
gradle.properties 8dc3b50009 fix(all): 修复阶段性bug 4 years ago
gradlew 6667387061 add store 4 years ago
gradlew.bat 5567207f06 feat(server): 添加后端框架 4 years ago
pm2-gateway-api.json 40412439f7 feat(deploy): 环境部署脚本 4 years ago
settings.gradle 5567207f06 feat(server): 添加后端框架 4 years ago

README.md

架构说明

依赖

  • Gradle
  • SpringBoot
  • Mybatis
  • Shiro
  • Druid

模块划分

  • Root: 根项目用户管理依赖关系,包括:SpringBoot,以及资源打包,各模块之间的依赖设置
  • tools: 工具类库,提供无业务逻辑的工具,包括:mybatis-example,shiro-redis,以及各类第三方服务
  • data: 数据管理类库,主要提供mybatis,mybatis-generator,flyway的配置管理
  • xxx-api: api提供应用,提供SpringBoot的Application的启动支持

配置管理

  • xx-api需设定可支持的配置文件 spring: profiles: active: runtime, tools, data
    • runtime: 可根据运行环境加载对应的配置文件,通过profile中进行不同环境的配置管理
    • tools,data: 对应自模块的配置信息
  • 支持各个模块建立独立的配置文件

缓存

  • 通过Redis+Ehcache实现不同需求的缓存 @Cacheable(cacheNames="redis-SSAccountInfo", key="'SSAccountInfo_' + #root.args[0].accountId", unless="#result==null") @Cacheable(cacheNames="SSAccountInfo", key="'SSAccountInfo_' + #root.args[0].accountId", unless="#result==null")
  • 通过前缀进行划分

数据库管理

  • 通过Flyway进行版本管理
  • 配置在data模块中
  • 版本sql存放在resources/db/migration中
  • 通过Mybatis-generator生成所需的Dao、Mapping、Entity、Example
  • tools模块中包含通用Example
  • 建议通过Service提供数据支持(tools中提供Service类库用于继承),避免在generator的文件中变更

Api支持

  • 通过Swagger生成所有api文档用于对接
  • 使用注解的方式在controller中说明接口信息
  • shiro打开对于接口文档的访问权限 ```

```