Spring Data Elastic Search with Shield

*爱你&永不变心* 提交于 2019-12-21 20:55:51

问题


Does Spring Data Elastic Search template support username and password? What are the options to if we need to use spring data to connect to elastic search that is protected with Shield.

Current configuration

<elasticsearch:transport-client id="client" cluster-nodes="${elasticsearch.cluster.host}:${elasticsearch.cluster.port}"
 cluster-name="${elasticsearch.cluster.name}" />

<bean name="elasticsearchTemplate" class="org.springframework.data.elasticsearch.core.ElasticsearchTemplate">
    <constructor-arg name="client" ref="client"/>
</bean>

回答1:


I don't think this is currently being supported, but there is an open pull request for this feature: https://github.com/spring-projects/spring-data-elasticsearch/pull/152



来源:https://stackoverflow.com/questions/33442604/spring-data-elastic-search-with-shield

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!