文件的名字以及格式
hh.properties
aaa=提莫队长正在送命

方法1:
spring.xml中schema要这样写
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd"

然后公共配置要这样写
<!-- 读取properties文件-->
<util:properties id="properties" location="classpath:hh.properties"/>
然后java类中要
@Autowired
private Properties properties;
方法中要这样写
public void m1(){
//这样就会输出提莫队长正在送命
System.out.println(properties.getProperty("aaa"));
}
方法2:
Properties properties = new Properties();
File f=ResourceUtils.getFile("classpath:hh.properties");
properties.load(new InputStreamReader(new FileInputStream(config), "utf-8"));