IDEA 2020.3.3版本,创建了Maven->Spring Boot项目,使用System.out.println(),@Slf4j 中的debug,info 控制台输出 出现中文乱码问题
解决步骤1. 先检查 File -> Settings -> File Encodings 是否设置为 UTF-8 (没有解决)
2. Edit Configurations中 设置VM Options 为 -Dfile.encoding=UTF-8 (没有解决)
3. 在Help -> Edit Custom VM Options 中追加 -Dfile.encoding=utf-8,并且重启IDEA (没有解决)
最后在pom.xml文件中 标签中添加如下配置,解决了问题
true -Dfile.encoding=UTF-8