zoukankan      html  css  js  c++  java
  • spring配置,spring中的bean 的id不能相同

    lib下加入包

    spring.jar

    commons-logging.jar

    src下添加 applicationContext.xml

     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>

  • 相关阅读:
    Centos 6.5 在 Dell 服务器安装的记录
    【转载】你真的了解补码吗
    【转载】我对补码的理解
    记录一下家里双路由实现wifi漫游功能
    中国大学MOOC | C语言程序设计入门 第8周编程练习 翁恺
    华为卡刷包线刷方法
    串口通信
    端口复用和端口重映射
    软件仿真和硬件仿真
    FPGA之四位LED灯
  • 原文地址:https://www.cnblogs.com/friends-wf/p/3782673.html
Copyright © 2011-2022 走看看