1 Jar
type are packaged
- Use
mvn celan package
Package - use
java –jar 包名
2 war
types of packaged way
- Use
mvn celan package
Package - use
java –jar 包名
3 External Tomcat
Run
- Use
mvn celan package
Package - 2.0 war package placed in
tomcat webapps
the next run.
Note: springboot2.0 built tomcat8.5.25, it recommends the use of external Tomcat9.0 version can be run, otherwise an error is not compatible versions.
4 pack common errors
If the error is no master list, in pom
the new file:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<maimClass>com.itmayiedu.app.App</maimClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>