Closed
Description
Sébastien Deleuze opened SPR-17275 and commented
When using functional bean registration, BeanDefinitionCustomizer
lambda gives access to a BeanDefinition
lambda parameter that does not give access to various AbstractBeanDefinition
methods, requiring a cast to AbstractBeanDefinition
which is not elegant and make our API not very discoverable for those use cases.
I think it could be useful to expose those methods in BeanDefinition
interface:
- setAbstract
- setAutowireMode
- getAutowireMode
- setDependencyCheck
- getDependencyCheck
- setInitMethodName
- getInitMethodName
- getDestroyMethodName
- setDestroyMethodName
- setRole
- getRole
- setDescription
- getDescription
Those ones are candidates as well, but I have no real use case in mind for them for the moment, so they are not mandatory to expose:
- addQualifier
- getQualifiers
- hasQualifier
- getQualifier
- setLenientConstructorResolution
- isLenientConstructorResolution
- setResourceDescription
- getResourceDescription
Issue Links:
- GenericApplicationContext.registerBean should support non-default constructors [SPR-17292] #21825 GenericApplicationContext.registerBean should support non-default constructors