as mentioned in the question, I used Elasticsearch + mybatis. There was a problem in the integration. First, the figure
@MapperElasticsearchRepositorymybatisElasticsearchdaoElasticsearchRepository
articleDao beanActionspring.main.allow-bean-definition-overriding=true
Error creating bean with name "articleController": Unsatisfied dependency expressed through field "articleService"; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name "articleService": Unsatisfied dependency expressed through field "articleDao"; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name "articleDao": Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property search found for type Article!
ElasticsearchRepository
Note Project environment is SpringBoot 2.1.1.RELEASE, elasticsearch dependency is spring-boot-starter-data-elasticsearch, same as 2.1.1.RELEASE
I don"t know if it"s because of the addition of
This problem just came out ofspring.main.allow-bean-definition-overriding=true, but the problem of repeatedly registering bean has been solved, and this is the next problem. For those who have encountered related problems, please help
.