SpringBoot内置Tomcat控制台打印中文乱码解决

在使用SpringBoot内置Tomcat时,控制台打印中文乱码如图

image

看了网上很多帖子说POM添加依赖设置中文


org.springframework.boot
spring-boot-maven-plugin

true

-Dfile.encoding=UTF-8

我试了没有成功,后来在Idea->run

image

添加如下代码

-Dfile.encoding=UTF-8
image

应用重启即可~

image

posted @ 2020-08-20 10:20  Power_Gives  阅读(794)  评论(0)    收藏  举报