maven ssm项目错误bug简单总结

1.org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException 异常
这里写图片描述
使用run as Maven build ,使用tomcat:run运行报这个错是因为tomcat版本和jdk版本不一样,默认是使用tomcat6去运行web项目的
修复方法:使用tomcat7运行,受限在pom.xml中加入下面的插件:

<build>
<plugins>
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
<configuration>
<port>8080</port>
<uriEncoding>UTF-8</uriEncoding>
</configuration>
</plugin>
</build>

然后使用tomcat7:run ,之后就不报错了;

猜你喜欢

转载自blog.csdn.net/my_momo_csdn/article/details/79545651
今日推荐