The
Spring boot hit jar POM configuration is as follows: note Spring-boot-maven-plugin version problem
<build> <plugins> <plugin> <GROUPID>ORG.SPRINGFRAMEWORK.BOOT&L T;/groupid> <artifactId>spring-boot-maven-plugin</artifactId> <!--currently available only 1.4.2 version,--> <version>1.4.2.RELEASE</version> <configuration cannot be displayed with other versions of JSP
> <fork>true</fork> <!--spring-boot:run Chinese garbled solution--> <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments> <MAINCLASS>COM.ZYC.ZSP Ringboot.
Zspringbootapplication</mainclass> </configuration> <executions> <execution> <goals> <goal>repackage< /goal> </goals> </execution> </executions>
; ≪/plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <configuration> &L T;failonmissingwebxml>false</failonmissingwebxml> </configuration> </plugin&
Gt
</plugins> <resources> <!--when packaging, copy the JSP file to the Meta-inf directory--> <resource> <!--specify which directory resource files are processed by the resources plug-in--> <DIRECTORY>SRC/MAIN/WEBAPP</DIRECTORY&G
T <!--Note This must be placed in this directory to be accessed to--> <targetPath>META-INF/resources</targetPath> & Lt;includes> <include>**/**</include> </includes> ;/resource> <resource> <directory>src/main/resources</directory> <includes> <include>**/**</include> </ includes> <filtering>false</filtering> </resource> <resour
Ce> <directory>src/main/java</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> </r Esources> </build>
My development tool is using idea click Maven Project to find the input Maven command window as follows:
Click the button above with M to enter:
Clean:clean PACKAGE-DMAVEN.TEST.SKIP=TRUE-E
Locate the jar in the project target directory, and use the cmd Input command Java-jar Xxx.jar to start your jar