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"/>