Spring:无法加载bean引用文件

时间:2014-06-18 15:20:29

标签: java spring

我的web.xml看起来像这样:
        <context-param> <param-name>parentContextKey</param-name> <param-value>app.context</param-value> </context-param>

beanRefContext.xml文件夹中有一个名为bin/target/projectName/WEB-INF/classes的文件。
beanRefContext的内容是标准的。它列出了bean名称app.context下的其他配置文件。

    <bean id="app.context" class="org.springframework.context.support.ClassPathXmlApplicationContext">
     <constructor-arg>
        <list>
         <value></value>
         <value></value>
        </list>
    </constructor-arg>
 </bean>

错误

 org.springframework.beans.factory.access.BootstrapException: Unable to return specified BeanFactory instance: factory key [app.context], from group with resource name [classpath*:beanRefContext.xml]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'app.context' is defined
10:49:54,686 INFO  [stdout] (ServerService Thread Pool -- 54)   at org.springframework.beans.factory.access.SingletonBeanFactoryLocator.useBeanFactory(SingletonBeanFactoryLocator.java:402) ~[spring-beans-3.2.2.RELEASE.jar:3.2.2.RELEASE]

0 个答案:

没有答案