spring读取配置文件:
1. spring加载配置文件:
<context:property-placeholder location="classpath:config/system.properties"/>
2. 配置文件内容:
YTZ_SPECIAL_USER_PHONE=13912622596,18721293900,18656253360
YTZ_SPECIAL_USER_PHONE2=13912622596,18721293900,18656253360
3. 通过spring去注入属性值.
//读取配置文件中特殊权限的用户名和手机号
@Value("${YTZ_SPECIAL_USER_NAME}")
private String ytzSpecialUserName;