How to make elasticsearch embedded accessible via localhost:9200

clandestino_bgd picture clandestino_bgd · Aug 27, 2014 · Viewed 10.3k times · Source

I am playing with spring-boot-sample-data-elastcisearch project. I've changed the pom and added:

SampleElasticsearchApplicationWebXml extends SpringBootServletInitializer 

to run with Tomcat embedded. My application.properties has

spring.data.elasticsearch.http-enabled=true
spring.data.elasticsearch.local=true

I want to be able to connect to localhost:9200 in order to use elasticsearch-head or other JS client. What am I missing? Thanks, Milan

Answer

Fynn picture Fynn · Aug 6, 2015

According to this ticket, you can now simply add this line to your configuration files:

spring.data.elasticsearch.properties.http.enabled=true