Springboot page garbled problem

The springboot static page clearly shows utf8, but the problem of Chinese garbled characters still appears during execution. The
solution is as follows:

#application.yml文件下加一下内容:
#解决返回乱码问题
spring:
  http:
    encoding:
      charset: utf-8
      enabled: true
      force: true
#application.properties文件下加一下内容:
#解决返回乱码问题
#spring.http.encoding.charset=UTF-8
#spring.http.encoding.force=true
#spring.http.encoding.enabled=true
server.servlet.encoding.charset=UTF-8
server.servlet.encoding.force=true
server.servlet.encoding.enabled=true

Guess you like

Origin blog.csdn.net/weixin_44182157/article/details/109058550