SpringBoot继承es跑起项目的时候报Consider defining a been named ‘elasticsearchTemplate’ in you configuration

此问题借阅其他人帖子,
异常信息SpringBoot继承es跑起项目的时候报Consider defining a been named ‘elasticsearchTemplate’ in you configuration_第1张图片

SpringBoot继承es跑起项目的时候报Consider defining a been named ‘elasticsearchTemplate’ in you configuration_第2张图片 

在application.yml,里面配置

spring:
  data:
    elasticsearch:
      repositories:
        enabled: true
      cluster-nodes: 127.0.0.1:9300 

在application.properties,里面配置

spring . data. elasticsearch. repositories.enabled = true
spring . data. elasticsearch. cluster-nodes =127 .0.0.1:9300 

 

你可能感兴趣的:(SpringBoot继承es跑起项目的时候报Consider defining a been named ‘elasticsearchTemplate’ in you configuration)