作者热门文章
- html - 我的下拉菜单的内容关闭得太快
- c# - 使用 Html Agility Pack 从网页中的表中获取值而不使用 "SelectNode'
- html - 内容容器下的 CSS 下拉菜单
- html - 如何停止嵌套列表重叠父列表?
我知道 SLF4J 的问题是一个常见问题:类路径包含多个 SLF4J 绑定(bind)。
SLF4J: Found binding in [jar:file:/C:/Users/<name>/.gradle/caches/4.9/generated-gradle-jars/gradle-api-4.9.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/C:/Users/<name>/.gradle/caches/modules-2/files-2.1/org.apache.logging.log4j/log4j-slf4j-impl/2.2/afd596adf5086b4f4746254b25a3a4b513f1d6e4/log4j-slf4j-impl-2.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
import org.gradle.api.*
class CommonTestPlugin implements Plugin<Project> {
apply plugin: 'java-gradle-plugin'
No dependencies matching given input were found in configuration ':compileClasspath'
compile (group: 'com.aestasit.infrastructure.sshoogr', name: 'sshoogr', version: '0.9.26'){
// exclude this to stop warnings about multiple SLF4J bindings.
exclude group: 'ch.qos.logback', module: 'logback-classic'
}
最佳答案
我遇到了同样的问题。到目前为止,我发现的解决方法是从正在构建的目标 JAR 中粗暴地排除:
bootJar{
exclude('gradle-api-*.jar', 'groovy-*.jar')
}
bootJar
扩展
jar
任务。
关于gradle - SLF4J : multiple SLF4J bindings with Gradle Plugin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51644795/
我是一名优秀的程序员,十分优秀!