You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using @Counted with the @PreAuthorize annotated class causes an exception in reactive spring context
Required to bind 2 arguments, but only bound 1 (JoinPointMatch was NOT bound in invocation)
java.lang.IllegalStateException: Required to bind 2 arguments, but only bound 1 (JoinPointMatch was NOT bound in invocation)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.argBinding(AbstractAspectJAdvice.java:601)
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Assembly trace from producer [reactor.core.publisher.MonoDefer] :
reactor.core.publisher.Mono.defer
org.springframework.security.authorization.method.AuthorizationManagerBeforeReactiveMethodInterceptor.invoke(AuthorizationManagerBeforeReactiveMethodInterceptor.java:139)
Error has been observed at the following site(s):
*__Mono.defer ? at org.springframework.security.authorization.method.AuthorizationManagerBeforeReactiveMethodInterceptor.invoke(AuthorizationManagerBeforeReactiveMethodInterceptor.java:139)
*___Mono.then ? at org.springframework.security.authorization.method.AuthorizationManagerBeforeReactiveMethodInterceptor.invoke(AuthorizationManagerBeforeReactiveMethodInterceptor.java:140)
|_ Mono.from ? at org.springframework.core.ReactiveAdapterRegistry$ReactorAdapter.toPublisher(ReactiveAdapterRegistry.java:260)
|_ Mono.from ? at org.springframework.web.reactive.result.method.annotation.AbstractMessageWriterResultHandler.writeBody(AbstractMessageWriterResultHandler.java:160)
|_ ? at org.springframework.web.reactive.result.method.annotation.AbstractMessageWriterResultHandler.writeBody(AbstractMessageWriterResultHandler.java:112)
|_ ? at org.springframework.web.reactive.result.method.annotation.ResponseBodyResultHandler.handleResult(ResponseBodyResultHandler.java:96)
Environment
spring boot 3.2.5
Micrometer version 1.12.5
Micrometer registry: simple
OS: windows/linux
Java version: 21
To Reproduce
How to reproduce the bug:
Simple restcontroller with @EnableReactiveMethodSecurity annotated with @PreAuthorize and a controller method annotated with @Counted
Expected behavior
it just works without problems, authorizes and counts calls correctly
Additional context
The text was updated successfully, but these errors were encountered:
Describe the bug
Using
@Counted
with the@PreAuthorize
annotated class causes an exception in reactive spring contextEnvironment
spring boot 3.2.5
To Reproduce
How to reproduce the bug:
Simple restcontroller with
@EnableReactiveMethodSecurity
annotated with@PreAuthorize
and a controller method annotated with@Counted
Expected behavior
it just works without problems, authorizes and counts calls correctly
Additional context
The text was updated successfully, but these errors were encountered: