Spring boot ElasticSearch,出现ElasticsearchRepository.refresh()! No property refresh found for type错误

  • 在使用实体类上同时注解@Entity @Document
  • jpa search Repository放在同一个包下面
    会出现这个错误
    解决方案:
  • 将jpa search Repository放在不同的包下面
@EnableElasticsearchRepositories(basePackages = "com.xxxx.elsearchrepository")
@EnableJpaRepositories(basePackages = {"com.xxxx.jparepository"})

你可能感兴趣的:(Spring boot ElasticSearch,出现ElasticsearchRepository.refresh()! No property refresh found for type错误)