我的项目(非常庞大的项目)有两个 ApplicationContexts。一个带有数据的旧 xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans default-autowire="autodetect">
</beans>
现在我需要将我的其他项目 applicatinContext 添加到它或任何其他方式,这样任何模块都不会受到影响
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean id="positionResponsesDAO"
class="com.xxx.modules.worklist.DAO.Impl.PositionResponsesDAOImpl">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="positionDAO"
class="com.xxx..modules.worklist.DAO.Impl.PositionDAOImpl">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="nextActionDAO"
class="com.xxx..modules.worklist.DAO.Impl.NextActionDAOImpl">
<property name="dataSource" ref="dataSource" />
</bean>
<bean>
....... few more
</bean>
<bean id="workOrderManager" class="com.xxx.modules.worklist.action.manager.impl.WorkOrderManagerImpl">
<property name="positionDO" ref="positionDO" />
<property name="moveWorkOrderDO" ref="moveWorkOrderDO" />
<property name="nextActionDO" ref="nextActionDO" />
<property name="positionDAO" ref="positionDAO" />
<property name="moveResponsesDAO" ref="moveResponsesDAO" />
<property name="moveWorkOrderDAO" ref="moveWorkOrderDAO" />
<property name="nextActionDAO" ref="nextActionDAO" />
<property name="positionResponsesDAO" ref="positionResponsesDAO" />
</bean>
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="oracle.jdbc.driver.OracleDriver" />
<property name="jdbcUrl" value="driverUrl" />
<property name="user" value="MCMGR" />
<property name="password" value="MC123" />
</bean>
</beans>
第一个启用了自动接线,而这个需要手动接线。我如何将它们结合起来放入一个 xml 或读取两个配置。