Spring的配置,引入其他配置文件(分模块开发)

```xml
<import resource="applicationContext-xxx.xml"/>
```

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<bean name="service" class="service.userService2">
    <property name="userBean2" ref="userBean2"></property>
</bean>


<import resource="applicationContext1.xml"></import>



</beans>

 

posted @ 2020-05-07 11:12  每月工资一万八  阅读(352)  评论(0)    收藏  举报