-
Couldn't load subscription status.
- Fork 38.8k
Description
Following up on #35286, another gap turned up: While there is a PRESERVE_TARGET_CLASS_ATTRIBUTE for enforcing a target class proxy for a specific bean definition (in case of the bean getting proxied in the first place), there is no way to enforce an interface-based proxy. The new EXPOSED_INTERFACES_ATTRIBUTE (declared in AutoProxyUtils) allows for suggesting an interface Class or Class[] for a specific bean definition, or an empty array signalling all implemented interfaces to be proxied (also available as ALL_INTERFACES_ATTRIBUTE_VALUE constant).
We intend to build on this for the annotated component model, suggesting such a proxy hint next to @Bean and @Component declarations.