1.

How to disable specific auto-configuration class?

Answer»
  • You can use the EXCLUDE attribute of @EnableAutoConfiguration for this purpose as SHOWN below:
@EnableAutoConfiguration(exclude = {InterviewBitAutoConfiguration.class})

If the class is not specified on the classpath, we can specify the fully qualified NAME as the VALUE for the excludeName.

//By using "excludeName"@EnableAutoConfiguration(excludeName={Foo.class})
  • You can add into the application.properties and multiple CLASSES can be added by keeping it comma-separated.


Discussion

No Comment Found