在web.xml中配置
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring-config.xml</param-value>
</context-param>
也在
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
"spring-config.xml");
写明了配置文件
spring-config.xml放在resources目录下
始终报这个错
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
请各位帮我看看