-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Open
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configtype: breaks-passivityA change that breaks passivity with the previous releaseA change that breaks passivity with the previous releasetype: enhancementA general enhancementA general enhancement
Milestone
Description
Given #15816, it may be easier to make Spring Security's bean resolution policy more consistent.
Reports like #15751 and #15538 make it clear that the existing behavior in some parts of Spring Security is surprising. To alleviate that, we can favor ObjectProvider#getIfAvailable
. This is already an improvement over getBeanOrNull
since it also supports the @Primary
annotation, simplifying the remediation for duplicate beans.
Because getIfAvailable
throws an exception when there are multiple candidate beans and getIfUnique
does not, this is not a passive change, so it would need to happen in Spring Security 7 or later.
Metadata
Metadata
Assignees
Labels
in: configAn issue in spring-security-configAn issue in spring-security-configtype: breaks-passivityA change that breaks passivity with the previous releaseA change that breaks passivity with the previous releasetype: enhancementA general enhancementA general enhancement