Gradle – SpringからCommons-Loggingを除外する
Springフレームワークから `commons-logging`を除外する例を示します。
build.gradle
compile('org.springframework:spring-webmvc:4.2.4.RELEASE'){
exclude group: 'commons-logging', module: 'commons-logging'
}
複数のSpring依存関係がある場合、それぞれを除外する必要があります
build.gradle
compile('org.springframework:spring-webmvc:4.2.4.RELEASE'){
exclude group: 'commons-logging', module: 'commons-logging'
}
compile('org.springframework:spring-test:4.2.4.RELEASE'){
exclude group: 'commons-logging', module: 'commons-logging'
}
より良い解決策は、プロジェクトレベルで `コモンズロギング ‘を除外することです。
build.gradle
configurations.all {
exclude group: "commons-logging", module: "commons-logging"
}
compile 'org.springframework:spring-webmvc:4.2.4.RELEASE'
compile 'org.springframework:spring-test:4.2.4.RELEASE'