标签:xml Settings 部署 boot idea pom Devtools true
开发时使用,生产环境关闭
1.Adding devtools to your project
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency>
2.Adding plugin to your pom.xml
下段配置复制到项目pom.xml文件或者父类总工程的pom.xml中
<plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <fork>true</fork> <addResources>true</addResources> </configuration> </plugin> </plugins>
3.Enabling automatic build
在idea中做如下设置
File -> Settings(New Project Settings->Settings for New Projects) ->Complier
下面项勾选
- Automatically show first error in editor
- Display notification on build completion
- Build project automatically
- Compile independent modules in parallel
4.Update the value of
在idea中,键入如下快捷键,使得idea允许热部署:
键入Ctrl + Shift + Alt + / ,(如果是mac,则快捷键是:Command + Shift + Alt + / )打开Registry,勾选:
- compiler.automake.allow.when.app.running
- actionSystem.assertFocusAccessFromEdt
5.重启IDEA
标签:xml,Settings,部署,boot,idea,pom,Devtools,true 来源: https://www.cnblogs.com/suhaha/p/14628994.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。