一、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 項目構建管理
閱讀更多 默默學習 的文章