[SpringBoot] - 6 pack released

1 Jartype are packaged

  1. Use mvn celan packagePackage
  2. use java –jar 包名

2 wartypes of packaged way

  1. Use mvn celan packagePackage
  2. use java –jar 包名

3 External TomcatRun

  1. Use mvn celan packagePackage
  2. 2.0 war package placed in tomcat webappsthe 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 pomthe 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>
Published 675 original articles · won praise 214 · Views 140,000 +

Guess you like

Origin blog.csdn.net/weixin_42112635/article/details/104871510