解决了导致下一个问题的一个问题,现在我收到了关于不匹配的签名者的错误。请看下面:Spring Boot和Apache Spark安全例外:签名者不匹配
这是我原来的gradle这个build文件:
buildscript {
ext {
springBootVersion = '1.3.3.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'spring-boot'
jar {
baseName = 'appTest'
version = '1.0.0'
}
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
//compile 'org.apache.spark:spark-core_2.11:1.4.0' //problem here
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("com.h2database:h2")
compile('mysql:mysql-connector-java')
testCompile("junit:junit")
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile("junit:junit")
}
task wrapper(type: Wrapper) {
gradleVersion = '2.9'
}
如果我试图建立一个没有添加依赖compile 'org.apache.spark:spark-core_2.11:1.4.0'
运行。但是,如果我尝试与依赖运行它,我得到:
FAILURE: Build failed with an exception.
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/xxx/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-log4j12/1.7.16/54c6dd23a7c420e40b8848e962d5f2a3534260af/slf4j-log4j12-1.7.16.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/xxx/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.5/92353eb144695bba80b31f7bec4f36d871f230ac/logback-classic-1.1.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
研究,我发现this。然后我试图通过添加以下(仅高于我jar{...}
我gradle这个build文件)排除slf4j-log4j12
:
configurations.all {
exclude module: 'slf4j-log4j12'
}
里面居然构建。然而,当我尝试,并通过运行它,我得到另一个错误:
Caused by: java.lang.SecurityException: class "javax.servlet.http.HttpSessionIdListener"'s signer information does not match signer information of other classes in the same package
我认为这是由于多个罐子的使用具有不同的签名?我该如何解决这个问题?请帮忙!
对于完全错误,view here.