java - spring boot - 在 META-INF/spring.factories 中找不到自动配置 - gradle

标签 java spring spring-boot gradle

我正在后台使用 Spring Boot 创建 javafx 应用程序。为此,我使用了这个库:springboot-javafx-support每次启动时,我都会收到异常“在 META-INF/spring.factories 中找不到自动配置”。我不知道我做错了什么。我想我的 gradle 构建脚本一定有问题。

下面你可以找到gradle.build文件

buildscript {
    ext {
        springBootVersion = '2.0.1.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
//apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

group = 'pl.opfol.subiekt'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.9

sourceSets {
    main.java.srcDirs += 'build/generated/source/apt/main'
}

jar {
    enabled = true
}

bootJar {

    mainClassName = 'pl.opfol.subiekt.util.MainApp'
}


repositories {
    mavenCentral()
    maven {
        url "https://artifact.aspose.com/repo"
    }
    maven {
        url "https://dl.bintray.com/jerady/maven"
    }
}

dependencies {
    compile 'org.projectlombok:lombok:1.16.20'
    compile('org.springframework.boot:spring-boot-starter')
    compile('org.springframework.boot:spring-boot-starter-data-jpa')
    compile('org.springframework.boot:spring-boot-starter-validation')
    compile('org.springframework.boot:spring-boot-starter-logging')
    compile('com.h2database:h2:1.4.197')
    compile('javax.mail:javax.mail-api:1.6.1')
    compile('com.sun.mail:javax.mail:1.6.1')
    compile('commons-io:commons-io:2.6')
    compile('commons-codec:commons-codec:1.11')
    compile('org.apache.commons:commons-collections4:4.1')
    compile('org.apache.commons:commons-lang3:3.7')
    compile('commons-configuration:commons-configuration:1.10')
    compile('com.aspose:aspose-words:17.3.0:jdk16')
    compile('com.microsoft.sqlserver:mssql-jdbc:6.4.0.jre9')
    compile('javax.annotation:javax.annotation-api:1.3.2')
    compile('org.controlsfx:controlsfx:9.0.0')
    compile('com.itextpdf:itext7-core:7.1.1')
    compile('javax.xml.bind:jaxb-api:2.3.0')
    compile('com.jfoenix:jfoenix:9.0.0')
    compile('de.roskenet:springboot-javafx-support:2.1.6')
    compile('de.jensd:fontawesomefx-controls:9.1.2')
    compile('de.jensd:fontawesomefx-commons:9.1.2')
    compile('de.jensd:fontawesomefx-weathericons:2.0.10-9.1.2')
    compile('de.jensd:fontawesomefx-materialicons:2.2.0-9.1.2')
    compile('de.jensd:fontawesomefx-materialdesignfont:2.0.26-9.1.2')
    compile('de.jensd:fontawesomefx-octicons:4.3.0-9.1.2')
    compile('de.jensd:fontawesomefx-fontawesome:4.7.0-9.1.2')
    compile('de.jensd:fontawesomefx-materialstackicons:2.1-5-9.1.2')
    compile('de.jensd:fontawesomefx-icons525:4.2.0-9.1.2')
    compile('de.jensd:fontawesomefx-emojione:3.1.1-9.1.2')
    compileOnly ('org.hibernate:hibernate-jpamodelgen:5.2.16.Final')
    testCompile('org.springframework.boot:spring-boot-starter-test')
}

最佳答案

我遇到了同样的问题,请确保您在 JRE 1.8 上运行它。

关于java - spring boot - 在 META-INF/spring.factories 中找不到自动配置 - gradle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49711935/

相关文章:

java - 从 xpath 中查找包含标签作为 Java 子元素的字符串

java - 对运行不同进程的同一应用程序使用不同的 log4j 配置文件

eclipse - 无法实例化 [org.springframework.web.context.support.XmlWebApplicationContext]

java - 发送消息时出现 IOException - 找不到文件

java - 序列化反序列化对象 EOFException

java - 一次安装了我的 Android 应用程序的两个实例!什么会导致这个?

java - JDBC 中的用户界面 - 查看表

spring - Webflux Spring 2.1.2 自定义Content-Type

java - MapStruct - 找不到实现

java - 在 Spring 中动态注入(inject)类