目前受影响的Apache Log4j2版本:
2.0 ≤ Apache Log4j <= 2.14.1
官方给的临时缓解措施:
1. 禁止没有必要的业务访问外网
2. 使用jvm参数启动 -Dlog4j2.formatMsgNoLookups=true
3. 设置 log4j2.formatMsgNoLookups=True
4. 系统环境变量中将 FORMAT_MESSAGES_PATTERN_DISABLE_LOOKUPS 设置为true
官方给的方案不够具体,现提供一个具体方案
自测通过,debug测试如下: