elasticsearch 安全连接示例
************************
单机连接
配置文件
spring:
elasticsearch:
rest:
uris: http://host:port
username: elastic
password: 123456
控制台输出
2020-01-22 16:40:34.545 INFO 10952 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.30]
2020-01-22 16:40:34.648 INFO 10952 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2020-01-22 16:40:34.648 INFO 10952 --- [ main] o.s.web.context.ContextLoader : Root Web