Spring Boot Web project play jar support Run jsp__c#

Source: Internet
Author: User

The

Spring boot hit jar POM configuration is as follows: note Spring-boot-maven-plugin version problem

<build> <plugins> <plugin> &LT;GROUPID&GT;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> &LT;MAINCLASS&GT;COM.ZYC.ZSP Ringboot.
                    Zspringbootapplication</mainclass> </configuration> <executions> <execution> <goals> <goal>repackage< /goal> </goals> </execution> </executions&gt
            ; &Lt;/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--> &LT;DIRECTORY&GT;SRC/MAIN/WEBAPP&LT;/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



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.