一、Spring Boot 推荐目录结构
*(1)代码层的结构
~根目录:com.xxx
- 工程启动类(ApplicationServer.java)置于com.xxx.build包下
- 实体类(domain)置于com.xxx.domain
- 数据访问层(Dao)置于com.xxx.repository
- 数据服务层(Service)置于com,xxx.service,数据服务的实现接口(serviceImpl)至于 com.xxx.service.impl
- 前端控制器(Controller)置于com.xxx.controller
- 工具类(utils)置于com.xxx.utils
- 常量接口类(constant)置于com.xxx.constant
- 配置信息类(config)置于com.xxx.config
- 数据传输类(vo)置于com.xxx.vo*
~资源文件的结构: ~根目录:src/main/resources
- 配置文件(.properties/.json等)置于config文件夹下
- 国际化(i18n))置于i18n文件夹下
- spring.xml置于META-INF/spring文件夹下
- 页面以及js/css/image等置于static文件夹下的各自文件下
- 建议使用yml.把application.properties 改为 application.yml
二、常用WEB技术选项
- 技术 名称
- springboot springboot框架
- Apache Shiro 权限框架
- MyBatis Generator 代码生成
- PageHelper MyBatis物理分页插件
- hikari 数据库连接池
- Thymeleaf 模板引擎
- Log4J 日志组件
- Swagger2 接口测试框架
- Maven 项目构建管理
閱讀更多 默默學習 的文章