<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 父节点依赖,引入这个之后相关的引入就不需要添加version配置,spring boot会自动选择最合适的版本进行添加。
-->
<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>
<!-- 指定一下jdk的版本 ,这里我们使用jdk 1.8 ,默认是1.6 -->
<java.version>1.8</java.version>
</properties> <dependencies> <!--
spring-boot-starter-web: MVC,AOP的依赖包....
-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<!--
<version></version>
由于我们在上面指定了 parent(spring boot)
-->
</dependency> <!-- 添加fastjson 依赖包. -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.15</version>
</dependency> <!-- spring boot devtools 依赖包. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
<scope>true</scope>
</dependency> <!-- 热部署方法2 vm中添加:
-javaagent:.\lib\springloaded-1.2.4.RELEASE.jar -noverify
    -->
    <dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.4.RELEASE</version>
</dependency> <!-- 添加MySQL数据库驱动依赖包. -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency> <!-- 添加Spring-data-jpa依赖. -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency> </dependencies> <!-- 构建节点. -->
<build>
<plugins>
<!-- 在这里添加springloader plugin 热部署方法1 启动: spring-boot:run
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin </artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.4.RELEASE</version>
</dependency>
</dependencies>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
<configuration>
<classifier>exec</classifier>
</configuration>
</execution>
</executions>
</plugin>
--> <!-- 这是spring boot devtool plugin 热部署3 常用-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!--fork : 如果没有该项配置,这个devtools不会起作用,即应用不会restart -->
<fork>true</fork>
</configuration>
</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 父节点依赖,引入这个之后相关的引入就不需要添加version配置,spring boot会自动选择最合适的版本进行添加。 --><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>    <!-- 指定一下jdk的版本 ,这里我们使用jdk 1.8 ,默认是1.6 -->    <java.version>1.8</java.version>  </properties>
  <dependencies>    <!--   spring-boot-starter-web: MVC,AOP的依赖包....  -->  <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId><!-- <version></version>由于我们在上面指定了 parent(spring boot) --></dependency><!-- 添加fastjson 依赖包. --><dependency><groupId>com.alibaba</groupId><artifactId>fastjson</artifactId><version>1.2.15</version></dependency><!-- spring boot devtools 依赖包. --><dependency>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-devtools</artifactId>            <optional>true</optional>           <scope>true</scope></dependency><!-- 热部署2 --><dependency>    <groupId>org.springframework</groupId>    <artifactId>springloaded</artifactId>    <version>1.2.4.RELEASE</version></dependency>

<!-- 添加MySQL数据库驱动依赖包. --><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId></dependency><!-- 添加Spring-data-jpa依赖. --><dependency>    <groupId>org.springframework.boot</groupId>    <artifactId>spring-boot-starter-data-jpa</artifactId></dependency>  </dependencies>
<!-- 构建节点. --><build><plugins><!-- 在这里添加springloader plugin<plugin>          <groupId>org.springframework.boot</groupId>          <artifactId>spring-boot-maven-plugin </artifactId>          <dependencies>             <dependency>                 <groupId>org.springframework</groupId>                 <artifactId>springloaded</artifactId>                 <version>1.2.4.RELEASE</version>           </dependency>          </dependencies>          <executions>             <execution>                 <goals>                     <goal>repackage</goal>                 </goals>                 <configuration>                     <classifier>exec</classifier>                 </configuration>             </execution>         </executions></plugin> --><!-- 这是spring boot devtool plugin --><plugin>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-maven-plugin</artifactId>            <configuration>          <!--fork :  如果没有该项配置,肯呢个devtools不会起作用,即应用不会restart -->                <fork>true</fork>            </configuration>        </plugin></plugins></build>
  </project>

spring boot热部署pom.xml配置的更多相关文章

  1. Spring Boot 系列(六)web开发-Spring Boot 热部署

    Spring Boot 热部署 实际开发中,修改某个页面数据或逻辑功能都需要重启应用.这无形中降低了开发效率,所以使用热部署是十分必要的. 什么是热部署? 应用启动后会把编译好的Class文件加载的虚 ...

  2. spring boot: 热部署spring-boot-devtools

    spring boot: 热部署spring-boot-devtools 1引入spring-boot-devtools依赖包 <!-- spring boot devtools 热部署 --& ...

  3. Spring Boot 热部署(转)

    Spring Boot 热部署 实际开发中,修改某个页面数据或逻辑功能都需要重启应用.这无形中降低了开发效率,所以使用热部署是十分必要的. 什么是热部署? 应用启动后会把编译好的Class文件加载的虚 ...

  4. Spring Boot热部署插件

    在实际开发中,我们修改某些代码逻辑功能或页面都需要重启应用,这无形中降低了开发效率,热部署是指当我们修改代码后,服务能自动重启加载新修改的内容,而不需要重启应用,这样大大提高了我们开发的效率. Spr ...

  5. spring boot: 热部署(一) run as – java application (spring-loader-1.2.4.RELEASE.jar)

    spring boot: 热部署(一) run as – java application (spring-loader-1.2.4.RELEASE.jar) 如果使用的run as – java a ...

  6. spring boot 热部署devtools实现(成功,主要是添加依赖后配置setting)

    1.devtools spring为开发者提供了一个名为spring-boot-devtools的模块来使Spring Boot应用支持热部署,提高开发者的开发效率,无需手动重启Spring Boot ...

  7. spring boot 热部署devtools实现

    1.devtools spring为开发者提供了一个名为spring-boot-devtools的模块来使Spring Boot应用支持热部署,提高开发者的开发效率,无需手动重启Spring Boot ...

  8. 3. Spring Boot热部署【从零开始学Spring Boot】

    转载:http://blog.csdn.net/linxingliang/article/details/51584549 在编写代码的时候,你会发现我们只是简单把打印信息改变了下,就需要重新部署,如 ...

  9. spring boot热部署 -- 实现 后端java热更新 -- 详细操作 【idea 的 JRebel破解】

    1.前言 上一随笔写了如何使得spring boot热更新前端 ,但后端java部分无法热更新. 对于Java热更新,以前常使用  springloaded  ,但是缺点 和bug很多 无法实现真正意 ...

随机推荐

  1. iOS:UI简单的总结

    UI简单总结: 一.常用单例: NSBundle *bundel = [NSBundle mainBundle]; //加载资源 NSFileManager *fm = [NSFileManager  ...

  2. java学习笔记3--类与对象的基础

    本文地址:http://www.cnblogs.com/archimedes/p/java-study-note3.html,转载请注明源地址. 1.面向对象的程序设计方法概述 面向对象的程序设计 与 ...

  3. PHP的错误处理方式(开发和上线)

    对于PHP开发人员来说,一旦某个产品投入使用.应该马上将 display_errors选项关闭.以免由于这些错误所透露的路径.数据库连接.数据表等信息而遭到黑客攻击. 可是.不论什么一个产品在投入使用 ...

  4. PHP的代理模式

    php的代理模式的实现: 理解一种模式,可以融会贯通,和其它的模式进行对比.找出为什么要 代理模式呢?跟父类.接口的区别是什么? 为什么需要这种模式?存在的价值? 原文:https://www.cnb ...

  5. Windows Server 2012 R2如何编辑hosts文件

    在我的Windows Server 2012 R2系统里编辑hosts文件则会出现没有无法保存的问题,原因是权限不足 错误信息:" Unable to save C:\Windows\Sys ...

  6. Download Visual Studio

    Welcome to a new way to install Visual Studio! In our newest version, we've made it easier for you t ...

  7. Linux ${} 变量内容的提取和替换功能等

    [root@localhost log]# var=/dir1/dir2/file.txt 1.对变量取值 [root@localhost log]# echo ${var} /dir1/dir2/f ...

  8. 微信小程序 - wx:key

    看官方源码以及代码示例: 示例官网:列表渲染wx:key 官方原话 如果列表中项目的位置会动态改变或者有新的项目添加到列表中,并且希望列表中的项目保持自己的特征和状态(如 <input/> ...

  9. C# Dictionary通过value获取对应的key值[转发]

    1:最直白的循环遍历方法,可以分为遍历key--value键值对以及所有的key两种表现形式 2:用Linq的方式去查询(当然了这里要添加对应的命名空间 using System.Linq) 如下为一 ...

  10. ZooKeeper安装方法具体解释

    ZooKeeper安装方式分为两种,一种为单机模式.一个为集群模式,集群模式须要事先正确配置hadoop集群,安装方法參考hadoop-1.2.1安装方法具体解释 单机模式安装: 1.上传并解压zoo ...