postman測試請求參數中文亂碼問題


用IDEA調試代碼時,用postman測試請求url,發現post或者get請求中參數是中文的話,後臺獲取的參數是亂碼,html

通常兩個方面tomcat

發送請求的一方:postman的問題post

接受請求的一方:tomcat的問題測試

postman的解決方案,能夠先設置全局變量,將漢字寫到變量,並在參數中添加全局變量引用便可。編碼

參考:http://www.javashuo.com/article/p-wryaqupp-ca.htmllua

但並無什麼luan用。。。。url

以後就檢查tomcat的配置,發現tomcat默認配置並無對文字編碼進行配置spa

因而:.net

修改tomcat servlet.xml調試

<Connector port="8180" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" URIEncoding="UTF-8"/>

 

感謝https://blog.csdn.net/che_ku/article/details/79445808

相關文章
相關標籤/搜索