在web启动时加载spring 配置文件,错误提示web.xml:
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
tomcat启动错误信息:
2005-10-24 22:34:56 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2005-10-24 22:34:56 org.apache.catalina.core.StandardContext start
严重: Context [] startup failed due to previous errors
高手们怎么解决
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
tomcat启动错误信息:
2005-10-24 22:34:56 org.apache.catalina.core.StandardContext start
严重: Error listenerStart
2005-10-24 22:34:56 org.apache.catalina.core.StandardContext start
严重: Context [] startup failed due to previous errors
高手们怎么解决
对spring 还是很陌生的!spring改变了我们程序员的代码方式!还是接受不了呀!
<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/applicationContext.xml</param-value>
</context-param >
问一下,你的配置文件定义了吗?
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<!--Spring配置文件,当前设置为classpath下的Spring文件夹下面,可以根据自己的实际要求配置-->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:spring/*.xml
</param-value>
</context-param>
注意,Spring相关jar包不能少!
spring.jar
spring-core.jar
spring-web.jar
slf4j-api.jar
slf4j-sample.jar
……
看你缺失什么包都加进去!