以前自己建些整合ssm或ssh的demo或项目都是习惯,将多数属性配置放在同意一个配置文件中,例如
而在实际项目中,spriing的xml配置和外部的属性文件配置,都是按功能分开的,易于后期维护。今天在开发中就把自己坑惨了。
例如我有一个spring-application.xml加载一个配置文件
<context:property-placeholder location="classpath:db.properties"/>
还有一个spring-task.xml加载另一个
<context:property-placeholder location="classpath:task.properties"/>
<bean id="student" class="com.ly.entity.Student">
<property