I want to exclude a single Spring bean that's included in the packages scanned by Spring's component scan. I'd like to do this by using some kind of exclude parameter of the @SpringBootApplication annotation. All of Spring Boot's documentation seems to explain how to exclude "auto configuration classes" like LiquibaseAutoConfiguration.class. I don't want to exclude an auto configuration class - I'd just like to exclude a single bean. I'm using Spring Boot 2.7.4. Does anyone know how to do this?
Asked
Active
Viewed 144 times
0
-
Is this your own bean? I mean, can you change it? Or is it from a library? – Reg Sep 23 '22 at 14:48
-
no - it's from a library – stackhouse Sep 23 '22 at 15:07
-
Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Sep 25 '22 at 13:14