Maven工程读取properties文件过程

1、创建需要读取的properties文件

2、在xml文件中加载配置文件

<!-- 加载配置文件 -->
<context:property-placeholder location="classpath:conf/resource.properties" />

3、使用@Value注解调用该属性

 

posted @ 2019-02-07 12:49  没有名字~  阅读(2718)  评论(0编辑  收藏  举报