spring boot升级异常

[已解决]org.springframework.boot.context.config.ConfigFileApplicationListener does not define。

java.lang.AbstractMethodError: Receiver class org.springframework.boot.context.config.ConfigFileApplicationListener does not define

spring boot升级出现以上异常,需查看pom.xml中是否使用了spring-boot-starter-parent和dependencyManagement,注意两者的版本问题。

若不知如何处理,删除或注释掉dependencyManagement节点。

<!-- <dependencyManagement>
        <dependencies>
            <dependency>
                Import dependency management from Spring Boot
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-dependencies</artifactId>
                <version>x.x.x.RELEASE</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement> -->