spingboot 打包jar

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_32534855/article/details/83374067

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..

然后在target下找到.jar文件

运行 java -jar xxx.jar

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

猜你喜欢

转载自blog.csdn.net/qq_32534855/article/details/83374067
今日推荐