首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 其他相关 >

Spring中PropertyPlaceholderConfigurer的施用

2012-11-22 
Spring中PropertyPlaceholderConfigurer的使用可以通过Spring中的PropertyPlaceholderConfigurer来读取配

Spring中PropertyPlaceholderConfigurer的使用

可以通过Spring中的PropertyPlaceholderConfigurer来读取配置信息:


1.

If the class cannot be resolved at runtime to a valid class, resolution of the bean fails when it is about to be created, which is during the<!-- 方式一 --><bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"><property name="locations"> <value>classpath:jdbc.properties</value> </property></bean><!--方式二 --><bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"><property name="location"> <value>classpath:jdbc.properties</value> </property></bean><!-- 方式三 --><context:property-placeholder location="classpath:jdbc.properties"/>