栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

idea中springboot的热启动配置方法

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

idea中springboot的热启动配置方法

1.在pom.xml引入相关依赖


    org.springframework

    springloaded

    1.2.6.RELEASE





    org.springframework.boot

    spring-boot-devtools

    1.3.0.RELEASE

    true

2.“File” -> “Settings” -> “Build,Execution,Deplyment” -> “Compiler”,选中打勾 “Build project automatically” 。

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

在2021版之前的idea一般均可通过上述方法,如若没有可以在setting里面勾选

小细节 勾选compiler.document.save.enabled(指定是否启用保存项目响应当文档被更改),并将它们的对应的保存动作延时时间适当缩小,或者使用默认值也可以、

 

 常见问题

1.启动时出现下图时,该问题是因为组件的版本号而导致的问题

java.lang.IllegalStateException: Restarter has not been initialized
    at org.springframework.util.Assert.state(Assert.java:392) ~[spring-core-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    at org.springframework.boot.devtools.restart.Restarter.getInstance(Restarter.java:563) ~[spring-boot-devtools-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationPreparedEvent(RestartApplicationListener.java:75) ~[spring-boot-devtools-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:48) ~[spring-boot-devtools-1.5.3.RELEASE.jar:1.5.3.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE]
    at org.springframework.boot.context.event.EventPublishingRunListener.contextLoaded(EventPublishingRunListener.java:85) ~[spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.boot.SpringApplicationRunListeners.contextLoaded(SpringApplicationRunListeners.java:66) ~[spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:367) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:313) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at com.*.SpringBootWebApplication.main(SpringBootWebApplication.java:17) [classes/:na]


    org.springframework.boot

    spring-boot-devtools

    

    1.3.0.RELEASE

    true

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/830618.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号