文章

【若依】2、结构分析

结构

common为依赖的最低层,提供一些公共的工具;比如:BaseController、BaseEntry; common之上就是framework,提供系统的一些配置;比如:Security、AOP、DataSource; system模块对应系统管理; quartz模块对应定时任务; generator模块对应代码生成; admin项目的统一入口,controller一般写在这里,service、mapper都写在子模块中,所有子模块都会被它引用;

配置

加载多个properties配置文件时,只需一个注解: @PropertySource(value = {"classpath:application-druid.properties"}) @PropertySource@Value配合使用 @PropertySource@ConfigurationProperties配合使用 image.png 如果是yml配置文件,SpringBoot只会识别application.yml文件 通过多环境配置,使数据源驱动配置文件生效(application-druid.ymlimage.png

本文由作者按照 CC BY 4.0 进行授权