I'm wiring a third party library into a Spring Boot application and I'd like to both control its lifecycle and benefit from exception transform/translation capability of @Repository
.
I can inherit from the type in the third party library and use @Repository
on the inherited type, but that would not work for final classes and I want the lifecycle flexibility of @bean
.
Is there any way I can declare a bean to also act like a stereotype?