30.6.2 使用Spring Data连接Elasticsearch
spring.data.elasticsearch.cluster-nodes=localhost:9300@Component
public class MyBean {
private final ElasticsearchTemplate template;
public MyBean(ElasticsearchTemplate template) {
this.template = template;
}
// ...
}最后更新于