Recently started learning Springcloud, want to package the modules in the project, easy to deploy multiple times. But on the internet to find a lot of solutions, have no operational success. Finally check the official website please add a link to describe the document to find a solution, by the way, the successful packaging paste it out.
First, modify the Pom.xml file
<?xml version= "1.0" encoding= "UTF-8"?>
<project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation= "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >
<modelVersion>4.0.0</modelVersion>
org.springframework.boot spring-boot-maven-plugin 2.0.3.RELEASE Rep Ackage Here are the main additions to the version and tags. Then, use the MAVEN command to package: After the MVN clean package is finished, you can run it directly with the Java-jar Module.jar. It is also important to note that the Spring Boot 2 version requires more than JDK8, and a low version package will make an error.
Packaged Springboot-Executable jar Package