1.配置方式
property-placeholder
<context: property-placeholder ignore-unresolvable="true" location="xxxx.properties"/>
2.注解方式
@PropertySource(value={“classpath:redis-key.properties”})
@PropertySource(value={"classpath:xxxx.properties"})
public class ReadProperties {
@Value(value="${文件中的key}")
private String USER_NAME;
}