您的位置:首页 > 编程语言 > Java开发

Spring Boot 在Gradle构建中使用Log4j日志

2015-10-10 11:38 941 查看
在使用Spring Boot的时候,想更换默认的日志组件,一直使用的是Log4j,在build.gradle配置里加入下面代码,排除logback的依赖:

configurations {
compile.exclude group:'ch.qos.logback'
}

dependencies {

compile ("org.springframework.boot:spring-boot-starter-web") {
exclude module: 'org.springframework.boot:spring-boot-starter-logging'
}
compile ('org.springframework.boot:spring-boot-starter-log4j')

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: