1、模块结构
四个模块
![](https://img-blog.csdnimg.cn/img_convert/198403e3fd78311ffd7f553f8955c509.png)
① admin——后台管理模块
② core——所有模块都能使用的工具类,常用类
③ parent——maven的父模块,所有项目的依赖都可以提到parent中统一依赖配置
④ rest——提供对接服务端接口的支持,利用jwt token鉴权机制,给予客户端的访问权限,传输数据用md5加密
2、包结构
├─main
│ │
│ ├─java
│ │ │
│ │ ├─com.stylefeng.guns----------------项目主代码
│ │ │ │
│ │ │ ├─common----------------项目公用的部分(业务中经常调用的类,例如常量,异常,实体,注解,分页类,节点类)
│ │ │ │
│ │ │ ├─config----------------项目配置代码(例如mybtais-plus配置,ehcache配置等)
│ │ │ │
│ │ │ ├─core----------------项目运行的核心依靠(例如aop日志记录,拦截器,监听器,guns模板引擎,shiro权限检查等)
│ │ │ │
│ │ │ ├─modular----------------项目业务代码
│ │ │ │
│ │ │ ├─GunsApplication类----------------以main方法启动springboot的类
│ │ │ │
│ │ │ └─GunsServletInitializer类----------------用servlet容器启动springboot的核心类
│ │ │
│ │ └─generator----------------mybatis-plus Entity生成器
│ │
│ ├─resources----------------项目资源文件
│ │ │
│ │ ├─gunsTemplate----------------guns代码生成模板
│ │ │
│ │ ├─application.yml----------------springboot项目配置
│ │ │
│ │ └─ehcache.xml----------------ehcache缓存配置
│ │
│ └─webapp----------------web页面和静态资源存放的目录