对与springboot在2.4.3以上可以直接修改版本号,对于低版本可以替换log4j-api, 'log4j-core' 和'log4j-jul',如下:
compile('org.springframework.boot:spring-boot-starter-log4j2'){ exclude group: 'org.apache.logging.log4j', module: 'log4j-api' exclude group: 'org.apache.logging.log4j', module: 'log4j-core' exclude group: 'org.apache.logging.log4j', module: 'log4j-jul' } compile('org.apache.logging.log4j:log4j-api:2.17.1') compile('org.apache.logging.log4j:log4j-core:2.17.1') compile('org.apache.logging.log4j:log4j-jul:2.17.1')
jul暂时也不知道是否必须升级,有知道的小伙伴可以告诉我一下哈