Get request to javaController garbled

postman shows Content-Type encoding application/json;charset=UTF-8 with utf-8 encoding format

as mentioned, I configured the encoding format in pom.xml. But how to get to controller is still garbled

Mar.21,2021

your information is not enough, based on the information you give, there is no way to determine which architecture your project uses, either way, you will eventually have to solve the problem of coding formatting.
you can try several options. If you prefer configuration programming, you should add code similar to the following at the top of the web.xml filter

.
<filter> 
    <!-- if you want encoding all request, this should be at the top of all your filters -->
    <filter-name>encodingFilter</filter-name>  
    <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>  
    <init-param>  
       <param-name>encoding</param-name>  
       <param-value>UTF-8</param-value>  
    </init-param>  
    <init-param>  
       <param-name>forceEncoding</param-name>  
       <param-value>true</param-value>  
    </init-param>      
</filter>  
<filter-mapping>  
    <filter-name>encodingFilter</filter-name>  
    <url-pattern>/*</url-pattern>  
</filter-mapping>

there is another possibility caused by the maven encoding format, but I don't think it is possible. It probably needs to be configured as follows:

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    ...
</properties>

if you prefer annotated programming, you can install it in a bean, with the following code:

@Bean public StringHttpMessageConverter stringHttpMessageConverter() {
    return new StringHttpMessageConverter(StandardCharsets.UTF_8); //Java 7 imported, 
    //return new StringHttpMessageConverter(Charset.forName("UTF-8"); // 
}

if you are using embedded tomcat, you may need to load a bean, operation as follows:

@Bean public EmbeddedServletContainerFactory servletContainer() {
    TomcatEmbeddedServletContainerFactory tomcat = new TomcatEmbeddedServletContainerFactory();
    tomcat.setUriEncoding("UTF-8");
    ...
    return tomcat;
}

if you are using an external tomcat, I suggest you add coding Filter to the server.xml http or https module (depending on your request protocol). The configuration is roughly as follows:

<connector port="8080" uRIEncoding="utf-8" ... />

as you configured in maven, it is also one of the ways. The code may have spelling or memory problems. Please clap the bricks and correct

.

you can take a look at your project's coding set, as well as specify the maven compile-time encoding. Maven defaults to gbk compilation

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e41e0c-43eb2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e41e0c-43eb2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?