Using custom @Enable annotations to toggle configuration

Allowing Spring Boot to automatically evaluate the classpath and detected configurations that are found there makes it very quick and easy to get a simple application going. However, there are times when we want to provide the configuration classes but require consumers of the starter library to explicitly enable such a configuration, rather than relying on Spring Boot to decide automatically if it should be included or not.

We will modify our previous recipe to make the starter be enabled via a meta-annotation rather than using the spring.factories route.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.184.214