当春季启动版本为 1.5.3.RELEASE 时,启动应用程序时出现以下错误
堆栈跟踪:
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]
NB :当版本更改为 1.4.2.RELEASE 时,它运行正常并且没有抛出上述异常
答案 0 :(得分:4)
由于工件的版本存在问题。删除版本 org.springframework.boot pom.xml中的spring-boot-devtools
答案 1 :(得分:0)
由于龙目岛,我注意到此错误。可能是因为在不同的项目中使用了多个版本的lombok。从.m2删除lombok文件夹解决了此问题。