springboot自定义配置文件加载

自定义配置加载 利用@PropertySource注解既可以引入配置文件,需要引入多个时,可使用@PropertySources设置数组,引入多个文件。 /** *单个文件 */ @PropertySource(value = "classpath:myDefine.properties",encoding = "utf-8") /** * 多个配置文件 */ 1)方法一,设置数
相关文章
相关标签/搜索