1
0
mirror of synced 2026-05-22 13:23:17 +00:00

Make springSecurityHandlerMappingIntrospectorBeanDefinitionRegistryPostProcessor passive

Instead of excluding the bean from AOT processing, we avoid redefining the beans if they are present or in the expected state.

Issue gh-14362
This commit is contained in:
Marcus Hert Da Coregio
2023-12-26 15:58:16 -03:00
parent 778a63a763
commit 92af758f1f
5 changed files with 38 additions and 23 deletions
@@ -50,7 +50,7 @@ class WebTestUtilsTestRuntimeHints implements TestRuntimeHintsRegistrar {
hints.reflection()
.registerType(TypeReference
.of("org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy"),
MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
MemberCategory.INVOKE_DECLARED_METHODS);
}
private void registerCsrfTokenRepositoryHints(RuntimeHints hints) {
@@ -62,8 +62,7 @@ class WebTestUtilsTestRuntimeHintsTests {
assertThat(RuntimeHintsPredicates.reflection()
.onType(TypeReference
.of("org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy"))
.withMemberCategories(MemberCategory.INVOKE_DECLARED_METHODS, MemberCategory.INVOKE_DECLARED_CONSTRUCTORS))
.accepts(this.hints);
.withMemberCategory(MemberCategory.INVOKE_DECLARED_METHODS)).accepts(this.hints);
}
@Test