A console garbled
The first step: the tomcat config folder logging.properties folder instead of coding GBK
Step Two: Modify the Tomcat configuration IDEA: Add -Dfile.encoding = UTF-8
Second, the program is garbled
Step one: Check the settings IDEA coding coding tool setter and projects
Step Two: Modify profile IDEA: Add -Dfile.encoding = UTF-8 encoding settings bin folders installation directory idea.exe.vmoptions folder and file idea64.exe.vmoptions
The third step: modifying the configuration of Tomcat IDEA; JAVA_TOOL_OPTIONS = -Dfile.encoding = UTF-8 is added on
If the above modifications can be further modified when there is a distortion in the tomcat server.xml config folder protocol = "HTTP / 1.1" Tags added URIEncoding = "UTF-8"
After the above configuration is complete, remember to re-compile the project and restart the IDEA tool or refresh the browser cache and so on.
---- OVER personally tested successfully, wasting a lot of time.