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>
这个名为"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>
解决方案 »
- NND, 项目移植报个No bean named 'sessionFactory' is defined
- 我来出个题
- 有了解portlet和widget的吗,他们之间是什么区别?
- request.getParameter后台为什么取到null值
- Oscache设置JMS集群启动weblogic报错
- 请问在使用非JNDI方式创建的SQLServerDataSource中,如何设置连接池大小,用户数量等?
- 数据库db2,怎样对clob字段进行写入和读取操作,十万火急!!!
- 关于struts DynaActionForm的问题(100分),急啊
- 弱智问题,java源文件路径和编译的问题
- 关于csdn帖子的问题!
- 过滤器过滤页面获不到页面地址栏的值!奇怪了!
- spring 方法增强的奇怪问题
如applicationState,applicationStateRegisterar等
getWebApplicationContext().getBean("abc");
这个abc在xml里没有
这个样子不就获取到了
ApplicationContext是不能去WebApplicationContext中getBean(),反过来可以(不知我有没有说反,现在忘了)具体可看web.xml中如何配置DispatcherServlet的,一般xml文件为/WEB-INF/servlet配置名称-servlet.xml。楼主说的getWebApplicationContext().getBean("xxx"); xxx就可在这个文件中找到。