小编hac*_*ang的帖子

JSON解析错误:无法构造io.starter.topic.Topic的实例

我正在学习Spring Boot并且我做了一个演示,但是当我发布一个添加对象的请求时它没有用!

错误消息是:

{
    "timestamp": 1516897619316,
    "status": 400,
    "error": "Bad Request",
    "exception": "org.springframework.http.converter.HttpMessageNotReadableException",
    "message": "JSON parse error: Can not construct instance of io.starter.topic.Topic: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?); nested exception is com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of io.starter.topic.Topic: no suitable constructor found, can not deserialize from Object value (missing default constructor or creator, or perhaps need to add/enable type information?)\n at [Source: java.io.PushbackInputStream@1ff3f09a; …
Run Code Online (Sandbox Code Playgroud)

java spring-boot

15
推荐指数
2
解决办法
3万
查看次数

标签 统计

java ×1

spring-boot ×1