1. The console log information is garbled.
1.1Problem description
Garbled characters
normal circumstances
1.2 Solution
Find logging.properties in the conf directory of tomcat used, as shown below
Find java.util.logging.ConsoleHandler.encoding in logging.properties
java.util.logging.ConsoleHandler.encoding =GBK and change it to UTF-8
2. The statements (Chinese) entered in the code are garbled on the console
details as following
2.1 Solution
Step 1 Click Edit Configurations to open the Run/Debug Configurations window;
The second step is to modify the Vm Options parameter VM options to: -Dfile.encoding=UTF-8
Finally click apply
Restart tomcat