elasticsearch 配置账号

elasticsearch.yml

http.cors.enabled: true
http.cors.allow-origin: "*"
http.cors.allow-headers: Authorization
xpack.security.enabled: true
xpack.security.transport.ssl.enabled: true

启动es

配置密码

elasticsearch-setup-passwords interactive

kibana.yml

elasticsearch.username: "elastic"
elasticsearch.password: "123456"

application.properties

spring.elasticsearch.rest.username=elastic
spring.elasticsearch.rest.password=123456
spring.elasticsearch.rest.uris=127.0.0.1:9200
上一篇:前段解决跨域


下一篇:js跨域问题