Caused by: java.lang.IllegalArgumentException: Unable to identify index name. WayBill is not a Document. Make sure the document class is annotated with @Document(indexName=“foo”)
SpringdataElasticsearch整合时遇到以上问题,原因是无法识别实体类上的索引名称 这个WayBill is not a Document.识别不到,最后找了一圈发现,我给实体类没有添加Document注解
//文档对象是(索引库名,类型) @Document(indexName = "...",type = "...")
然后给添加上之后就好了…