我们正在用gradle运行一个spring-boot应用程序.
为了包含spring-boot插件,我们将其添加为依赖项:
buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.2.RELEASE")
}
}
Run Code Online (Sandbox Code Playgroud)
不幸的是,这个插件附带了依赖
org.apache.logging.log4j:log4j-slf4j-impl:2.4.1
我想排除.
已经尝试过添加:
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.3.2.RELEASE") {
exclude group: 'org.apache.logging.log4j'
}
}
Run Code Online (Sandbox Code Playgroud)
哪个不起作用.
还添加:
configurations {
classpath.exclude group: 'org.apache.logging.log4j', module: 'log4j-slf4j-impl'
}
Run Code Online (Sandbox Code Playgroud)
没有任何影响.
任何提示都是受欢迎的.