POST提交异常 JsonParseException

xiaoxiao2021-02-28  24

POST提交,报以下异常,

"Could not read document: Unrecognized token 'userid': was expecting ('true', 'false' or 'null')↵ at [Source: java.io.PushbackInputStream@1fd46bc; line: 1, column: 8]; nested exception is com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'userid': was expecting ('true', 'false' or 'null')↵ at [Source: java.io.PushbackInputStream@1fd46bc; line: 1, column: 8]"

先说说我的框架,我用的是ajax提交,后台是springboot,

这里面涉及到:

@Controller和@RestController的区别,具体不详细介绍。 @ResponseBody跟@Controller这个一起用的 我这里使用了@RestController,所以导致以上报错, 要解析页面,需要用@Controller

转载请注明原文地址: https://www.6miu.com/read-1000347.html

最新回复(0)