Solve the problem of tomcat log garbled in the most detailed

1. Open tomcat in the following location: find the logging-properties file, choose to open it with a code editor (I choose idea here)
Insert picture description here
2. Change the five red boxed UTF-8 to GB2312 in lines 25-47,
Insert picture description here
click at this time Bin, startup.bat (window users) or startup.sh (mac users) under the directory to start tomcat, the console garbled problem is solved.
Insert picture description here
If you have not solved the garbled problem at this time, you need
1.windows + R to open and run, enter regedit in the run box, and enter the registry editor
Insert picture description here
2. If there is no Tomcat or CodePag
(1) Right-click Console–>New–>item, Create a Tomcat item
(2) Right-click the Tomcat item –> New –> DWORD(32) –> Name it CodePage

3. Double-click CodePage in HKEY_CURRENT_USER→Console→Tomcat and modify it to 65001 in decimal
Insert picture description here

At this point, the problem will definitely be solved perfectly

Insert picture description here

Guess you like

Origin blog.csdn.net/starry1441/article/details/115228489