在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') }