Java 由于运行build.gradle文件,无法启动

Java 由于运行build.gradle文件,无法启动,java,spring,spring-boot,gradle,Java,Spring,Spring Boot,Gradle,我是Spring world的新手,刚刚将pom.xml更新到gradle中,用于管理所有依赖项 gradle被社区抛弃了吗? 此外,此错误的可能根本原因是什么 刚刚意识到Spring boot有很多令人困惑的错误消息。我真的不认为这种错误消息对任何开发人员都有帮助。 对于这种错误有什么想法或方向吗 我只知道我将pom.xml更改为gradle,并手动迁移配置文件。 非常感谢 线程“main”java.lang.AbstractMethodError中出现异常:接收方类org.springfra

我是Spring world的新手,刚刚将pom.xml更新到gradle中,用于管理所有依赖项

gradle被社区抛弃了吗? 此外,此错误的可能根本原因是什么

刚刚意识到Spring boot有很多令人困惑的错误消息。我真的不认为这种错误消息对任何开发人员都有帮助。 对于这种错误有什么想法或方向吗

我只知道我将pom.xml更改为gradle,并手动迁移配置文件。 非常感谢

线程“main”java.lang.AbstractMethodError中出现异常:接收方类org.springframework.boot.context.config.ConfigFileApplicationListener未定义或继承接口org.springframework.context.SmartApplicationListener的解析方法abstract supportsSourceType(Ljava/lang/class;)Z的实现

格拉德尔 调试日志
我建议您根据您的需求从中生成项目

您拥有所需的依赖项

这是生成的build.gradle

plugins {
    id 'org.springframework.boot' version '2.1.9.RELEASE'
    id 'io.spring.dependency-management' version '1.0.8.RELEASE'
    id 'java'
}

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

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    runtimeOnly 'mysql:mysql-connector-java'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'org.springframework.security:spring-security-test'
}

您正在混合彼此不兼容的库:Spring Boot的每个版本都与Spring框架的一个基本版本相关联。强烈建议您不要指定其版本。基本上所有其他方面都是一样的:在使用boot2.1.9的应用程序中,不能使用1.3.5.RELEASE版本的spring引导启动器。阅读gradle插件文档。gradle被社区抛弃了吗?不,一点也不。但是如果你用错了方法,每个软件都不会做它应该做的事情。刚刚意识到Spring boot有很多令人困惑的错误信息。我真的不认为这种错误消息对任何开发人员都有帮助。这不是Spring启动错误消息。这是JVM抛出的java.lang.AbstractMethodError消息,因为您使用的类彼此不兼容。
> Task :bootRun FAILED
Exception in thread "main" java.lang.AbstractMethodError: Receiver class org.springframework.boot.context.config.ConfigFileApplicationListener does not define or inherit an implementation of the resolved method abstract supportsSourceType(Ljava/lang/Class;)Z of interface org.springframework.context.event.SmartApplicationListener.
        at org.springframework.context.event.GenericApplicationListenerAdapter.supportsSourceType(GenericApplicationListenerAdapter.java:79)
        at org.springframework.context.event.AbstractApplicationEventMulticaster.supportsEvent(AbstractApplicationEventMulticaster.java:282)
        at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:214)
        at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:185)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127)
        at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
        at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:76)
        at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:53)
        at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:342)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:305)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1204)
        at dev.house.XprojApplication.main(XprojApplication.java:14)
plugins {
    id 'org.springframework.boot' version '2.1.9.RELEASE'
    id 'io.spring.dependency-management' version '1.0.8.RELEASE'
    id 'java'
}

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

repositories {
    mavenCentral()
}

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
    implementation 'org.springframework.boot:spring-boot-starter-security'
    implementation 'org.springframework.boot:spring-boot-starter-web'
    runtimeOnly 'mysql:mysql-connector-java'
    testImplementation 'org.springframework.boot:spring-boot-starter-test'
    testImplementation 'org.springframework.security:spring-security-test'
}