Spring-boot启动会扫描以下位置的application.properties或者application.yml文件为Spring-boot的默认配置文件
高
- file:./config/
- file:./
- classpath:/config/
- classpath:/
低
优先级由高到低,高优先级的配置会覆盖低优先级的配置;
Spring-boot会从这四个位置全部加载主配置文件;互补配置
Spring-boot启动会扫描以下位置的application.properties或者application.yml文件为Spring-boot的默认配置文件
高
- file:./config/
- file:./
- classpath:/config/
- classpath:/
低
优先级由高到低,高优先级的配置会覆盖低优先级的配置;
Spring-boot会从这四个位置全部加载主配置文件;互补配置