在總的配置文件:application.properties中作一個配置,把個人問題解決了。spring
#編碼格式
spring.http.encoding.force=true
spring.http.encoding.charset=UTF-8
spring.http.encoding.enabled=true
server.tomcat.uri-encoding=UTF-8
這是我參考一篇文章解決的。tomcat
原文地址:https://blog.csdn.net/qq_39654841/article/details/81156695springboot
原文標題:springboot全局字符編碼設置(解決亂碼問題)app
百度關鍵字:springboot 中文亂碼編碼