原文:Content type 'text/xml;charset=UTF-8' not supported

最近開發微信公眾號時測試遇到這個問題,因為公眾號發過來的數據是xml,content type是text xml 原因應該是springboot默認解析都是json,需要在配置時加上xml的解析支持,並使用合適的MessageConverter 別忘了,pom.xml上加上 使用jackon轉化xml成對象需要在類上加上注解 ...

2021-03-17 18:51 0 898 推薦指數:

查看詳情

Content type 'text/plain;charset=UTF-8' not supported

報錯: Content type 'text/plain;charset=UTF-8' not supported 一開始使用對象方式接受數據,一直報錯. 改成下面形式就好了! 通過字符串接收,自己再解析一次. ...

Fri Sep 04 04:40:00 CST 2020 0 1040
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM