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 项目构建管理


分享到:


相關文章: