|
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener< stener-class>
< stener>
<listener>
<listener-class>cn.edu.buaa.iegsa.server.EventInterceptorListener< stener-class>
< stener>
在EventInterceptorListener里边用:
ApplicationContext applicationContext=WebApplicationContextUtils.getRequiredWebApplicationContext(event.getServletContext());
applicationContext.getBean("dataSource");
怎么得不到javabean呢?出现的错误是:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'dataSource' is defined |
|