elasticsearch搜索报错ElasticsearchException: failed to map source
程序员文章站
2022-06-13 21:12:59
...
1.报错情况,其实es已经有查询结果了,可是却报错了
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.解决方法
原因是确实无参构造函数,加上去就好了
public Article() {
}
上一篇: MUI之安卓点击返回键提示退出应用APP 等....
下一篇: C#给JSON对象添加一个键值对