Medium java spring

23. What happens when you exclude an auto-configuration class?

Sample answer: "The class is removed from the candidate list, so none of its beans are created, even if its conditions would match. I can exclude with @SpringBootApplication(exclude = ...), excludeName, or the spring.autoconfigure.exclude property. Then I have to provide those beans myself if the app needs them."

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
Sources (1)
  1. Using auto-configuration: Disabling specific auto-configuration classes