ElasticsearchException: failed to map source

1. Error report, in fact, es already has query results, but it is wrong

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.data.elasticsearch.ElasticsearchException: failed to map source [ {"id":1002,"title":"御街行·秋日怀旧","content":"纷纷坠叶飘香砌。夜寂静,寒声碎。真珠帘卷玉楼空,天淡银河垂地。年年今夜,月华如练,长是人千里。"}] to class Article] with root cause

2. Solution The
reason is that there is indeed no parameter constructor, just add it

 public Article() {
    }
Published 25 original articles · praised 4 · visits 1516

Guess you like

Origin blog.csdn.net/weixin_39025362/article/details/105267644