I'm looking for a way to prevent ElasticSearch for starting (embedded or separate server) in a Spring Boot project. ES is currently not in use, but will be at a later stage in the project.
If I remove the lines from the POM, my code needs major updates, because all annotations to ES cannot be found anymore.
Is there a way I can keep my project intact, but prevent ES from launching (embedded)?
My goal is to speed up restarts for the time being, when ES is not in use.
Or course, I could also run ES as a separate server, but I don't want to spend the time.
Thanks
Add the following exclude
to your @SpringBootApplication
import org.springframework.boot.autoconfigure.data.elasticsearch.ElasticsearchAutoConfiguration;
@SpringBootApplication(exclude = ElasticsearchAutoConfiguration.class)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With