Springboot配置文件的加載位置及優先順序

背景 springboot會按照下面優先級順序尋找application.properties文件和application.yml文件。高優先級覆蓋低優先級的文件內容。 file:./config 文件路徑下和src同級別新建一個文件夾 file:./ classpath:/config/ 類路徑下 classpath: spring.config.location可以用來改變加載文件位置。在項目
相關文章
相關標籤/搜索