【日常笔记】java spring 注解读取文件
2016-05-24 10:47
531 查看
获取后缀文件
<!-- 注解读取properties文件开始 @Value("#{configProperties['userPageSize']}")private String userPageSize; --> <bean id="configProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <property name="locations"> <list> <value>classpath:/config/*.properties</value> </list> </property> </bean> <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PreferencesPlaceholderConfigurer"> <property name="properties" ref="configProperties" /> </bean> <!-- 注解读取properties文件结束 -->
相关文章推荐
- Java本地方法(native方法)的实现
- Eclipse调试:F5、F6、F7、F8 (总要开个头吧)
- java回顾
- Meclipse jsp界面注释显示错误,解决方案
- day9
- SpringMVC入门学习 环境搭建+实例演示
- springMVC+mybaties 报错
- java注解框架
- Java知识点总结二
- java内存调优之jmap,jstack,mat
- java动态编程-Rhino脚本引擎
- Java集合
- JAVA集合概述
- AXIS2+Myeclipse实现WebService数据库存储简单实例
- Eclipse 编译错误 Access restriction:The type *** is not accessible due to restriction on... 解决方案
- Java线程安全和非线程安全
- Java成员变量的继承
- Spring声明式事务(xml配置事务方式)
- Java NIO编程
- java输出对象类总是为内存地址