SpringBoot WEB開發路子

一、Spring Boot 推薦目錄結構

*(1)代碼層的結構  

~根目錄:com.xxx    

  1. 工程啟動類(ApplicationServer.java)置於com.xxx.build包下    
  2. 實體類(domain)置於com.xxx.domain    
  3. 數據訪問層(Dao)置於com.xxx.repository    
  4. 數據服務層(Service)置於com,xxx.service,數據服務的實現接口(serviceImpl)至於 com.xxx.service.impl    
  5. 前端控制器(Controller)置於com.xxx.controller    
  6. 工具類(utils)置於com.xxx.utils    
  7. 常量接口類(constant)置於com.xxx.constant    
  8. 配置信息類(config)置於com.xxx.config    
  9. 數據傳輸類(vo)置於com.xxx.vo*

~資源文件的結構: ~根目錄:src/main/resources    

  1. 配置文件(.properties/.json等)置於config文件夾下    
  2. 國際化(i18n))置於i18n文件夾下    
  3. spring.xml置於META-INF/spring文件夾下    
  4. 頁面以及js/css/image等置於static文件夾下的各自文件下
  5. 建議使用yml.把application.properties 改為 application.yml

二、常用WEB技術選項

  1. 技術 名稱
  2. springboot springboot框架
  3. Apache Shiro 權限框架
  4. MyBatis Generator 代碼生成
  5. PageHelper MyBatis物理分頁插件
  6. hikari 數據庫連接池
  7. Thymeleaf 模板引擎
  8. Log4J 日誌組件
  9. Swagger2 接口測試框架
  10. Maven 項目構建管理


分享到:


相關文章: