Home Spring Boot MVC 问号后面中文乱码
Post
Cancel

Spring Boot MVC 问号后面中文乱码

  1. 增加一下参数
    1
    2
    3
    
    spring.http.encoding.charset=UTF-8
    spring.http.encoding.enabled=true
    spring.http.encoding.force=true
    
  2. Tomcat,在server.xml中的Connector标签增加useBodyEncodingForURI="true"

weixin.png

公众号名称:怪味Coding
微信扫码关注或搜索公众号名称
This post is licensed under CC BY 4.0 by the author.