关于Spring Cloud 框架热部署的方法


声明:本文转载自https://my.oschina.net/u/3375733/blog/1581756,转载目的在于传递更多信息,仅供学习交流之用。如有侵权行为,请联系我,我会及时删除。

1、在对应的pom.xml 文件中添加依赖

<!--热部署功能-添加依赖 by libingbin2015@aliyun.com --> <dependency>     <groupId>org.springframework.boot</groupId>     <artifactId>spring-boot-devtools</artifactId>     <!-- optional=true,依赖不会传递,该项目依赖devtools;之后依赖myboot项目的项目如果想要使用devtools,需要重新引入 -->     <optional>true</optional> </dependency>

2、:project 中添加 spring-boot-maven-plugin,主要在eclipse中使用,idea中不需要添加此配置。【IDEA 忽略这个步骤哦(⊙o⊙)?】

<build>     <plugins>         <plugin>             <groupId>org.springframework.boot</groupId>             <artifactId>spring-boot-maven-plugin</artifactId>             <configuration>                 <fork>true</fork>             </configuration>         </plugin>     </plugins> </build>

3、更改idea配置
  1) “File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。

  2) 组合键:“Shift+Ctrl+Alt+/” ,选择 “Registry” ,选中打勾 “compiler.automake.allow.when.app.running” 。

 

4、Chrome禁用缓存【开发时打开】

  F12或者“Ctrl+Shift+I”,打开开发者工具,“Network” 选项卡下 选中打勾 “Disable Cache(while DevTools is open)” 

 

 

本文为博主原创文章,转载请注明出处!

https://my.oschina.net/u/3375733/blog/

 

本文发表于2017年11月29日 18:33
(c)注:本文转载自https://my.oschina.net/u/3375733/blog/1581756,转载目的在于传递更多信息,并不代表本网赞同其观点和对其真实性负责。如有侵权行为,请联系我们,我们会及时删除.

阅读 2404 讨论 0 喜欢 1

抢先体验

扫码体验
趣味小程序
文字表情生成器

闪念胶囊

你要过得好哇,这样我才能恨你啊,你要是过得不好,我都不知道该恨你还是拥抱你啊。

直抵黄龙府,与诸君痛饮尔。

那时陪伴我的人啊,你们如今在何方。

不出意外的话,我们再也不会见了,祝你前程似锦。

这世界真好,吃野东西也要留出这条命来看看

快捷链接
网站地图
提交友链
Copyright © 2016 - 2021 Cion.
All Rights Reserved.
京ICP备2021004668号-1