在tomcat容器中啟動報錯
按教程走可以走通,但是tomcat啟動卻報錯如下:
嚴重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
按教程走可以走通,但是tomcat啟動卻報錯如下:
嚴重: Error configuring application listener of class org.springframework.web.context.ContextLoaderListener
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener
2017-04-19
舉報
2017-04-19
這個問題是因為tomcat啟動項目是找不到依賴包導致的。
如果使用tomcat容器,那么maven的插件就不能使用jetty了,要使用
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
他會將項目打包成war格式,再發布到tomcat中,這樣所有的依賴包都會復制到tomcat中。
2017-06-18
nice