Jersey ContainerRequestFilter not triggered

后端 未结 10 683
囚心锁ツ
囚心锁ツ 2020-12-05 06:34

I\'m trying to use a ContainerRequestFilter to enforce some authentication on a Tomcat based Jersey application. I followed this document. Problem : the filter

10条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 07:24

    I also had to add the @Provider JAX-RS annotation to my filters.
    This makes the filter discoverable during JAX-RS scanning phase.

    @Provider
    public class MyAppFilter implements ContainerRequestFilter {
        // filter logic
    }
    

提交回复
热议问题