IntelliJ IDEA中Tomcat控制台乱码解决

IDEA中Tomcat启动乱码解决

出现乱码

22-Jan-2022 22:10:19.099 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.5.37
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Dec 12 2018 12:07:02 UTC
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.5.37.0
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             D:\Program Files\Java\jdk1.8.0_121\jre
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_121-b13
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\hong\.IntelliJIdea2018.2\system\tomcat\Tomcat_9_0_0_M17_dfac
22-Jan-2022 22:10:19.103 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         D:\Program Files\tomcat8.5.37
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\hong\.IntelliJIdea2018.2\system\tomcat\Tomcat_9_0_0_M17_dfac\conf\logging.properties
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53135,suspend=y,server=n
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\hong\.IntelliJIdea2018.2\system\captureAgent\debugger-agent.jar=file:/C:/Users/hong/AppData/Local/Temp/capture3095.props
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
22-Jan-2022 22:10:19.104 淇℃伅 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
...

1, 进入设置-编码设置

Setting–>>> Editor---->>> File Encodings

将下图三个部分选为UTF-8, 再点下方apply应用即可

image-20220306011701030

2 进入IDEA安装目录/bin下修改idea64.exe.vmoptions文件 , 在最后一行添加-Dfile.encoding=UTF-8

image-20220306011733547

image-20220306011903419

-Dfile.encoding=UTF-8

3, Tomcat配置VM参数

进入Run/Debug Configurations, 在VM options添加

-Dfile.encoding=UTF-8

image-20220306162351858

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值