spingboot 打包jar

maven

   <build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
			<!-- 指定JDK编译版本 -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
		</plugins>
  </build>

eclipse -> Run as -> Maven build..

spingboot 打包jar

然后在target下找到.jar文件

运行 java -jar xxx.jar

 

https://cloud.tencent.com/developer/support-plan?invite_code=jykf9t9jq2zu