How to exlude packageScanning using application.properties?

Viewed 51

I'm using a spring boot with hibernate. I want to exclude one class from component scanning. I can do it by using @SpringBootApplication(exclude = HibernateJpaAutoConfiguration.class). I don't want to hardcode it in my application. But I want to give those properties in application.properties.

Does spring boot provide any options for that?

1 Answers

As it's stated in the documentation:

you can also control the list of auto-configuration classes to exclude by using the spring.autoconfigure.exclude property.

Related