无法使用Spring Boot运行spark,phoenix / hbase:检测到类路径上的log4j-over-slf4j.jar和绑定的slf4j-log4j12.jar

时间:2017-09-12 01:13:59

标签: java spring apache-spark spring-boot phoenix

当我尝试使用Spark / Phoenix依赖项编译/构建Spring Boot项目时,它说有太多SLF4J,当我尝试排除一个包时,它会引发上述错误。

我如何让他们一起工作?

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

    apply plugin: 'java'
    apply plugin: 'eclipse'
    apply plugin: 'org.springframework.boot'

    version = '0.0.1-SNAPSHOT'
    sourceCompatibility = 1.8

    repositories {
        mavenCentral()
    }

    //THIS DOESN'T WORK
    configurations {
        compile.exclude group:'ch.qos.logback'
    }

    dependencies {
        compile('org.springframework.boot:spring-boot-starter')
        /* EXCLUDING HERE ALSO DIDN'T WORK */
        compile('org.springframework.boot:spring-boot-starter-web')
        compile('org.apache.spark:spark-sql_2.10:1.5.2')
        compile('org.apache.spark:spark-core_2.10:1.5.2')
        compile('org.apache.phoenix:phoenix-spark:4.7.0-HBase-1.1')
        testCompile('org.springframework.boot:spring-boot-starter-test')
    }

0 个答案:

没有答案