From 2d4c498c3b73f7950a3f37f9fa13008d22095ebf Mon Sep 17 00:00:00 2001 From: Josh Cummings Date: Thu, 12 Sep 2024 15:42:48 -0600 Subject: [PATCH] Test Meta-Annotation Class Type Support in Reactive Issue gh-15747 --- .../PrePostReactiveMethodSecurityConfigurationTests.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostReactiveMethodSecurityConfigurationTests.java b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostReactiveMethodSecurityConfigurationTests.java index d2b5a74006..b82eb985bc 100644 --- a/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostReactiveMethodSecurityConfigurationTests.java +++ b/config/src/test/java/org/springframework/security/config/annotation/method/configuration/PrePostReactiveMethodSecurityConfigurationTests.java @@ -466,6 +466,15 @@ public class PrePostReactiveMethodSecurityConfigurationTests { verify(expressionHandler, times(4)).createEvaluationContext(any(Authentication.class), any()); } + // gh-15721 + @Test + @WithMockUser(roles = "uid") + public void methodWhenMetaAnnotationPropertiesHasClassProperties() { + this.spring.register(MetaAnnotationPlaceholderConfig.class).autowire(); + MetaAnnotationService service = this.spring.getContext().getBean(MetaAnnotationService.class); + assertThat(service.getIdPath("uid").block()).isEqualTo("uid"); + } + @Configuration @EnableReactiveMethodSecurity static class MethodSecurityServiceEnabledConfig {