java.lang.IllegalStateException:重新启动器尚未初始化

时间:2020-04-27 06:19:34

标签: spring-boot

启动Spring Boot App时出现下一条错误消息... 看来是某种版本问题。.但是,我刚刚添加了以下行:compile group: 'com.google.code.gson', name: 'gson', version: '2.8.6'

java.lang.IllegalStateException: Restarter has not been initialized
at org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.boot.devtools.restart.Restarter.getInstance(Restarter.java:543) ~[spring-boot-devtools-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.boot.devtools.restart.RestartApplicationListener.onApplicationEvent(RestartApplicationListener.java:50) ~[spring-boot-devtools-1.3.0.RELEASE.jar:1.3.0.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:158) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) [spring-context-5.2.5.RELEASE.jar:5.2.5.RELEASE]
at org.springframework.boot.context.event.EventPublishingRunListener.failed(EventPublishingRunListener.java:124) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplicationRunListeners.callFailedListener(SpringApplicationRunListeners.java:90) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplicationRunListeners.failed(SpringApplicationRunListeners.java:83) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:797) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.6.RELEASE.jar:2.2.6.RELEASE]
    plugins {
        id 'org.springframework.boot' version '2.2.6.RELEASE'
        id 'io.spring.dependency-management' version '1.0.9.RELEASE'
        id 'java'
    }

    group = 'com.damagedcase'
    version = '0.0.1-SNAPSHOT'
    sourceCompatibility = '1.8'

    configurations {
        compileOnly {
            extendsFrom annotationProcessor
        }
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        implementation 'org.springframework.boot:spring-boot-starter-data-jdbc'
        implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
        implementation 'org.springframework.boot:spring-boot-starter-security'
        implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
        implementation 'org.springframework.boot:spring-boot-starter-validation'
        implementation 'org.springframework.boot:spring-boot-starter-web'
        compile group: 'org.springframework.boot', name: 'spring-boot-devtools', version: '1.3.0.RELEASE'
        compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.10.3'
        compile group: 'com.amazonaws', name: 'aws-java-sdk', version: '1.11.759'
        compile group: 'com.google.guava', name: 'guava', version: '29.0-jre'
        compile group: 'org.openkoreantext', name: 'open-korean-text', version: '2.3.1'
        compile group: 'gov.nist.math', name: 'jama', version: '1.0.3'
        compile group: 'org.jgrapht', name: 'jgrapht-core', version: '1.4.0'
        compile group: 'com.google.code.gson', name: 'gson', version: '2.8.6'
        compileOnly 'org.projectlombok:lombok'
        runtimeOnly 'mysql:mysql-connector-java'
        annotationProcessor 'org.projectlombok:lombok'
        testImplementation('org.springframework.boot:spring-boot-starter-test') {
            exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
        }
        testImplementation 'org.springframework.security:spring-security-test'
    }

    test {
        useJUnitPlatform()
    }
    '''

I searched similar questions and got an answers like remove .m2 directory.. but it didn't work.
What should I do?

0 个答案:

没有答案