springboot自定義配置文件加載

自定義配置加載 利用@PropertySource註解既可以引入配置文件,需要引入多個時,可使用@PropertySources設置數組,引入多個文件。 /** *單個文件 */ @PropertySource(value = "classpath:myDefine.properties",encoding = "utf-8") /** * 多個配置文件 */ 1)方法一,設置數
相關文章
相關標籤/搜索