getWebApplicationContext().getBean("xxx");
这个名为"xxx"的bean我在哪个配置文件能找到呢?applicationContext.xml文件内容:
<beans> <!--  application state module -->
<bean id="applicationState"
class="org.vfny.geoserver.global.ApplicationState">
<constructor-arg ref="data"/>
<constructor-arg ref="validation"/>
<constructor-arg ref="config"/>
</bean>

<bean id="applicationStateRegisterar"
class="org.vfny.geoserver.global.GeoServerServletContextInitializer">

<constructor-arg type="java.lang.String" value="GeoServer.ApplicationState"/>
  <constructor-arg ref="applicationState"/>
  </bean>
 
</beans>

解决方案 »

  1.   

    就是applicationContext.xml里面的嘛
    如applicationState,applicationStateRegisterar等
      

  2.   

    没明白我的意思 
    getWebApplicationContext().getBean("abc");
    这个abc在xml里没有
      

  3.   

    getWebApplicationContext().getBean("applicationStateRegisterar");
    这个样子不就获取到了 
      

  4.   

    WebApplicationContext是ApplicationContext的子容器,它对应的xml文件一般在/WEB-INF/目录下,而ApplicationContext父容器对应的xml文件一般都在classpath下,例如/WEB-INF/classess/目录下。
    ApplicationContext是不能去WebApplicationContext中getBean(),反过来可以(不知我有没有说反,现在忘了)具体可看web.xml中如何配置DispatcherServlet的,一般xml文件为/WEB-INF/servlet配置名称-servlet.xml。楼主说的getWebApplicationContext().getBean("xxx"); xxx就可在这个文件中找到。
      

  5.   

    ApplicationContext()中可以同时在多个配置文件中获取容器中的值的信息,通常我们把配置文件放到src/目录下,而编译后则到了/classes/文件夹,这样我们可以查询里面有多少的对象在配置,有可能不再同一个applicationContext.xml文件中
      

  6.   

    你要把你XXX配置进XML文件中呀