How to identify annotations of invocated jax-rs method in resteasy filter within quarkus reactive context

64 views Asked by At

Moving from quarkus-resteasy to quarkus-resteasy-reactive I have encountered an issue within one jakarta.ws.rs.container.ContainerResponseFilter.

Previously, the code was trying to identify which http method a java method was annotated with, but this doesn't work anymore as resourceInfo doesn't provide these annotations.

    @Inject
    ResourceInfo resourceInfo;

    @Override
    public void filter(ContainerRequestContext contextRequest, ContainerResponseContext contextResponse) {
        
        Method resourceMethod = resourceInfo.getResourceMethod();
        if (resourceMethod != null && resourceMethod.isAnnotationPresent(POST.class)) {

            // do something 
        }

    }

Is there any other way to identify the annotations of the invoked rest endpoint within this filter context?

Quarkus version: 3.6.1

0

There are 0 answers