文章目录
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应用即可
2 进入IDEA安装目录/bin下修改idea64.exe.vmoptions
文件 , 在最后一行添加-Dfile.encoding=UTF-8
-Dfile.encoding=UTF-8
3, Tomcat配置VM参数
进入Run/Debug Configurations, 在VM options添加
-Dfile.encoding=UTF-8