1、创建需要读取的properties文件
2、在xml文件中加载配置文件
<!-- 加载配置文件 --> <context:property-placeholder location="classpath:conf/resource.properties" />
3、使用@Value注解调用该属性
1、创建需要读取的properties文件
2、在xml文件中加载配置文件
<!-- 加载配置文件 --> <context:property-placeholder location="classpath:conf/resource.properties" />
3、使用@Value注解调用该属性
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。