个人分享,能力有限,不喜勿喷。 项目为简单demo,仅供参考。码云地址:https://gitee.com/weifeng520/springboot-kafka.git 通过log4j2组件输出日志到kafka。