解决jetty7.0.pre5启动时报ClassNotFoundException: javax.interceptor.InvocationContext异常的问题
一.背景介绍:最近项目在使用maven命令行运行jetty服务器时出现ClassNotFoundException: javax.interceptor.InvocationContext异常
二.环境列举
spring
springMvc
mybatis
maven
mysql
三.解决办法
更换jetty插件的版本
1 <plugin> 2 <groupId>org.mortbay.jetty</groupId> 3 <artifactId>maven-jetty-plugin</artifactId> 4 <version>6.1.26</version> 5 <configuration> 6 <webApp>target/iris-0.0.1-SNAPSHOT.war</webApp> 7 <connectors> 8 <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector"> 9 <port>8087</port> 10 </connector> 11 </connectors> 12 <stopKey>exit</stopKey> 13 <stopPort>8081</stopPort> 14 <webAppSourceDirectory>src/main/webapp</webAppSourceDirectory> 15 <scanIntervalSeconds>2</scanIntervalSeconds> 16 <contextPath>/test</contextPath> 17 </configuration> 18 </plugin>
注意:此处<version>6.1.26</version>节点如果不进行配置,就会默认使用7.0.pre5。
感谢您花时间阅读此篇文章,如果您觉得这篇文章你学到了东西也是为了犒劳下博主的码字不易不妨打赏一下吧,让博主能喝上一杯咖啡,在此谢过了!
如果您觉得阅读本文对您有帮助,请点一下左下角“推荐”按钮,您的将是我最大的写作动力!另外您也可以选择【关注我】,可以很方便找到我!
本文版权归作者和博客园共有,来源网址:http://www.cnblogs.com/hafiz 欢迎各位转载,但是未经作者本人同意,转载文章之后必须在文章页面明显位置给出作者和原文连接,否则保留追究法律责任的权利!