gradle工程 springboot中使用log4j2

在gradle中配置

configurations {
    providedRuntime
    // remove default logger
    all*.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
dependencies {
    compile ('org.springframework.boot:spring-boot-starter-log4j2')

    compile('org.springframework.boot:spring-boot-starter-web')

    testCompile('org.springframework.boot:spring-boot-starter-test')
}

猜你喜欢

转载自blog.csdn.net/nanjizhiyin/article/details/82659905