【问题标题】:Context file getting over written in spring上下文文件在春天被覆盖
【发布时间】:2018-05-08 03:37:01
【问题描述】:

http://www.springframework.org/schema/beans/spring-beans-2.5.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">

   <import resource="classpath:context2.xml"/>

   <import resource="classpath:context3.xml" />

这里 Context1.xml 被 context2.xml 覆盖,context 1.xml 和 context2.xml 都是 MDB 的。 context3.xml 没有问题。 上下文 1 和上下文 2 有一些相同的 Bean ID,但具有不同的属性和引用。

【问题讨论】:

  • 您的问题不完整。提供一些代码以明确图片 id 问题。

标签: java xml spring spring-mvc


【解决方案1】:

我找到了解决方案。我使用的是相同的 Bean ID,并认为它是一个预定义的 Bean ID。我对春天的了解不多。所以我研究了一下,发现你可以为你所指的类提供你想要的任何 bean ID。

【讨论】:

    猜你喜欢
    • 2010-09-23
    • 1970-01-01
    • 1970-01-01
    • 2018-02-12
    • 2015-02-25
    • 1970-01-01
    • 2013-07-22
    • 2013-10-22
    • 2016-06-07
    相关资源
    最近更新 更多