Solve the problem of garbled characters in the IDEA front-end return value

Description of the problem: As shown in the picture, when I input Chinese characters in the input box in front of the query, idea prints out garbled characters and cannot jump to the search result interface. But I can print and jump normally when I enter the ID number (character type).

 

 Solution process: I checked some information, and it is said that JDK1.8 is encoded in UTF-8, so the file encoding needs to be modified to match it, so a major change is made.

1. Modify settings

1. Open IDEA and click File in the upper left corner to select Settings

2. Select Editor, then select File Encodings on the right, change the following three places to UTF-8 and Apply

 3. Modify the encoding method in the lower right corner of IDEA

It didn't work! !

2. Modify Tomcat and configuration files

1. Add in the Tomcat configuration as shown in the figure: -Dconsole.encoding=UTF-8 

 2. Find and add the following two files in the IDEA storage location: -Dconsole.encoding=UTF-8

 

 It didn't work either! ! ! !

3. Modify the parameter passing method of the Tomacat server

1. Find the following files in the Tomcat storage location:

2. Open and find the location

 roughly in the middle

3. Modify

注释掉:<Connector connectionTimeout="20000" port="8080" protocol="HTTP/1.1" redirectPort="8443"/>

写入:<Connector port="8080" protocol="HTTP/1.1"

               connectionTimeout="30000"

               redirectPort="8443" URIEncoding="UTF-8" />

 Then you can! ! ! That is, Tomcat7.0.67 is not friendly to the get method!

 

 

Guess you like

Origin blog.csdn.net/weixin_45467625/article/details/128166585