develop with

How to disable Redis loading in Spring boot

When you don't want your app to fail on redis connections on startup.

When it comes to deploying a Spring boot application into production, you need to have some adaptability on startup with some of the services. Spring boot has a tendency to try and connect to a bunch of different services at once. One of which is redis.

If you want to disable the auto connection for redis, add the following line to your application definition.

@EnableAutoConfiguration(exclude = RedisAutoConfiguration.class)

This will remove the auto configuration of redis allowing you to control the connection timing on your own.

comments powered by Disqus

Want to see a topic covered? create a suggestion

Get more developer references and books in the developwith store.