码迷,mamicode.com
首页 > 编程语言 > 详细

spring配置,spring中的bean 的id不能相同

时间:2014-06-12 07:47:11      阅读:306      评论:0      收藏:0      [点我收藏+]

标签:des   style   class   blog   code   java   

lib下加入包

spring.jar

commons-logging.jar

src下添加 applicationContext.xml

bubuko.com,布布扣
 1 <?xml version="1.0" encoding="UTF-8"?>
 2 <beans xmlns="http://www.springframework.org/schema/beans"
 3     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 4     xsi:schemaLocation="http://www.springframework.org/schema/beans
 5            http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
 6     <import
 7         resource="cn/itcast/spring/sh/ioc/createobject/applicationContext-createobject.xml" />
 8     <import resource="cn/itcast/spring/sh/ioc/alias/applicationContext-alias.xml" />
 9     
10     <import resource="cn/itcast/spring/sh/createobject/method/applicationContext-createobject-method.xml" />
11     
12 <!--     <import resource="cn/itcast/spring/sh/createobject/when/applicationContext-createobejct-when.xml" /> -->
13     
14 <!--     <import resource="cn/itcast/spring/sh/scope/applicationContext-scope.xml" /> -->
15     
16 <!--     <import resource="cn/itcast/spring/sh/initdestroy/applicationContext-initdestroy.xml" /> -->
17     
18 <!--     <import resource="cn/itcast/spring/sh/di/set/applicationContext-di-set.xml" /> -->
19     
20 <!--     <import resource="cn/itcast/spring/sh/di/constructor/applicationContext-di-constructor.xml" /> -->
21     
22 <!--     <import resource="cn/itcast/spring/sh/document/applicationContext-document.xml" /> -->
23 
24 <!--     <import resource="cn/itcast/spring/sh/mvc/applicationContext-mvc.xml"/> -->
25 </beans>
bubuko.com,布布扣

 

bubuko.com,布布扣

 

spring配置,spring中的bean 的id不能相同,布布扣,bubuko.com

spring配置,spring中的bean 的id不能相同

标签:des   style   class   blog   code   java   

原文地址:http://www.cnblogs.com/friends-wf/p/3782673.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!