maven start web service error reason

Although the configuration is tomcat9, but tomcat6 default, but does not support jdk1.8 version tomcat6
Here it is necessary to add tomcat7-maven-plugin plugin
Note: If your version is tomcat7-maven-plugin 2.0 then because it does not support jdk 1.8, so it changed the tomcat7-maven-plugin 2.2 on the line
add the following code in pom.xml:

<plugin>
  <groupId>org.apache.tomcat.maven</groupId>
  <artifactId>tomcat7-maven-plugin</artifactId>
  <version>2.2</version>
</plugin>


Thus configured, remember to Goalschange tomcat7:run, you can usetomcat8.5 
注意:官方并没有tomcat9-maven-plugin,这里只要使用tomcat7-maven-plugin就可以使用tomcat9

Guess you like

Origin www.cnblogs.com/lybstudy/p/11093737.html