Spring Boot Hot Deployment pom.xml configuration

Source: Internet
Author: User

<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> <groupId>com.kfit</groupId> <artifactid>spring-boot-hello</artifactid > <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging> <name> Spring-boot-hello</name> <url>http://maven.apache.org</url><!--Spring Boot Parent dependency, the introduction of this post-related introduction will not need to add a version configuration, Spring boot will automatically select the most appropriate version to add. -<parent> <groupId>org.springframework.boot</groupId> <artifactid>spring-bo                Ot-starter-parent</artifactid> <version>1.4.1.RELEASE</version> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- Specify the JDK version, here we use JDK 1.8, default is 1.6--<java.version>1.8</java.version> </properties> <depende Ncies> <!--Spring-boot-starter-WEB:MVC,AOP Dependency Package ....-<dependency> <groupId>org.springframework.boot</groupId> & Lt;artifactid>spring-boot-starter-web</artifactid> <!--<version>< /version>since we specified the parent (Spring boot) above-</dependency> <!--add Fastjson dependent packages. -<dependency> <groupId>com.alibaba</groupId> <artifactid>fastjs On</artifactid> <version>1.2.15</version> </dependency> <!--s Pring Boot Devtools dependent package. -<dependency> <groupId>org.springframework.boot</groupId> &LT;ARTIFAC Tid>spring-boot-devtools</artifactid> <optional>true</optional> <scope>true</scope> </dependency><!--Hot Deployment Method 2 VMs added:
-javaagent:.\lib\springloaded-1.2.4.release.jar-noverify
    -
<dependency><groupId>org.springframework</groupId> <artifactId>springloaded</artifactId> < Version>1.2.4.release</version> </dependency><!--add MySQL database driver dependency package. -<dependency> <groupId>mysql</groupId> &LT;ARTIFACTID&GT;MYSQ L-connector-java</artifactid> </dependency> <!--add SPRING-DATA-JPA dependency. -<dependency> <groupId>org.springframework.boot</groupId> &LT;ARTIFAC    Tid>spring-boot-starter-data-jpa</artifactid> </dependency> </dependencies> <!--build nodes. -<build> <plugins><!--here to add Springloader plugin Hot deployment Method 1 Start: Spring-boot:run<plugin> <groupId>org.springframework.boot</groupId> <artifactid&gt                          ; Spring-boot-maven-plugin </artifactId> <dependencies> <dependency> <groupId>org.springframework</groupId> <artifactid>spri Ngloaded</artifactid> <version>1.2.4.RELEASE</version> </de pendency> </dependencies> <executions> <execution&                         Gt                         <goals> <goal>repackage</goal> </goals>                         <configuration> <classifier>exec</classifier>     </configuration> </execution> </executions>       </plugin>               -                      <!--This is spring boot Devtool plugin Hot Deployment 3 common --           <plugin> <groupId>org.springframework.boot</groupId> <ARTIFACTID&G T;spring-boot-maven-plugin</artifactid> <configuration> <!--fork: if not With this configuration, this devtools will not work, i.e. the app will not restart-<fork>true</fork> </configurati on> </plugin> </plugins></build> </project>

<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>
<groupId>com.kfit</groupId> <artifactId>spring-boot-hello</artifactId> <version> 0.0.1-snapshot</version> <packaging>jar</packaging>
<name>spring-boot-hello</name> <url>http://maven.apache.org</url>
<!--Spring Boot parent dependency, the introduction of this post-related introduction does not need to add a version configuration, Spring boot will automatically select the most appropriate version to add. --><parent><groupid>org.springframework.boot</groupid><artifactid> Spring-boot-starter-parent</artifactid><version>1.4.1.release</version></parent> < Properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!--Specify the version of the JDK, Here we use JDK 1.8, default is 1.6-<java.version>1.8</java.version> </properties>
  <dependencies>    <!--   SPRING-BOOT-STARTER-WEB:MVC,AOP Dependency Pack .... --   <dependency><groupId>org.springframework.boot</groupId><artifactId> spring-boot-starter-web</artifactid><!-- <version></version> Because we specified the parent (spring boot)--></dependency>< Add the Fastjson dependency package!--. --><dependency><groupid>com.alibaba</groupid><artifactid>fastjson</artifactid ><version>1.2.15</version></dependency><!--Spring Boot devtools dependent package. --><dependency>            <groupid>org.springframework.boot</ groupid>            <artifactId>spring-boot-devtools</artifactId>            <optional>true</optional>           < scope>true</scope></dependency><!--Hot Deployment 2--><dependency>    <groupId>org.springframework</groupId>    <artifactid>springloaded </artifactId>    <version>1.2.4.RELEASE</version></dependency>

<!--add MySQL database driver dependency package. --><dependency><groupid>mysql</groupid><artifactid>mysql-connector-java</ artifactid></dependency><!--Add SPRING-DATA-JPA dependency. --><dependency> <groupId>org.springframework.boot</groupId> <artifactId> Spring-boot-starter-data-jpa</artifactid></dependency> </dependencies>
<!--build nodes. --><build><plugins><!--here to add Springloader plugin<plugin>          <groupId>org.springframework.boot</groupId>          <artifactId> Spring-boot-maven-plugin </artifactId>          <dependencies>             <dependency>               <groupid>org  . springframework</groupid>                 <artifactid>springloaded& lt;/artifactid>                 <version>1.2.4.RELEASE</version>           </dependency>          </dependencies>   &NBS P      <executions>             <execution>       &N Bsp         <goals>                     <goal>repackage</goal> &nbs P             </goals>                 &LT;CONFI guration>                     <classifier>exec</classifier& Gt                 </configuration>             & lt;/execution>         </executions></plugin>--><!--This is spring boot Devtool Plugin--><plugin>            <groupid>org.springframework.boot</ groupid>            <artifactId>spring-boot-maven-plugin</artifactId>            <configuration>          <!--Fork:   If there is no such Configuration, Ken Devtools will not work, that is, the application will not restart-->                <fork>true</fork>           &N bsp;</configuration>        </plugin></plugins></build>
</project>

Spring Boot Hot Deployment pom.xml configuration

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.