原文: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