最近在配置ssm框架 有一些问题和大家分享下。查了一些资料也问过一些专业的人。虽说分享的内容有点低级但是个人感觉很使用。
1.
<!-- spring的属性加载器,加载properties文件中的属性 -->
<bean id="propertyConfigurer"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location">
<value>classpath:config/DEV.properties</value>
</property>
<property name="fileEncoding" value="utf-8" />
</bean>
2.
<context:property-placeholder location="config/DEV.properties" />