1.applicarion-dev.properties
## 家乡属性 Dev
home.province=ZheJiang
home.city=WenLing
home.desc=dev: I'm living in ${home.province} ${home.city}.
2.Homepropertie.java
@Component
@ConfigurationProperties(prefix = "home")
@Component
@ConfigurationProperties(prefix = "home")
public class HomeProperties {
/**
* 省份
*/
private String province;
/**
* 城市
*/
private String city;
/**
* 描述
*/
private String desc;
}