-
Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Milestone
Description
As discussed in spring-projects/spring-boot#16184 (comment) it would be useful if @Lazy(false) could be used as signal that lazy initialization has been specifically disabled. This is not currently possible due to the fact that the AbstractBeanDefinition.isLazyInit() method uses a primitive boolean so there is no difference between @Lazy(false) and a missing annotation.
One suggestion made is to offer a getLazyInit method that returns Boolean.TRUE, Boolean.FALSE or null. Alternatively, we could also consider a LazyMode enum that provides ENABLED, DISABLED or DEFAULT as values.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement