springBoot/maven 自定义配置文件及属性值获取
2018-07-17 本文已影响0人
氕氘氚_笔记
自定义一个配置文件,名为xxx.properties
在所需使用的类上,加上@ConfigurationProperties、@PropertySource
@PropertySource("classpath:http-client.properties") 注明文件路径
@ConfigurationProperties(prefix = "http") 使用http开头的属性