SpringBoot配置文件加載順序

spring boot啓動會掃描以下位置的application.properties或者application.yml文件作爲springboot的默認配置文件 -file:./config/ -file:./ -classpath:/config/ -classpath: / 以上是按照優先級從高到低的順序,所有位置的文件都會被加載,高優先級配置內容會覆蓋低優先級配置內容 可以用java -j
相關文章
相關標籤/搜索