how to get path param from ContainerRequestContext

二次信任 提交于 2019-12-05 07:58:13

You used a @PreMatching annotation on the filter.

The Javadoc says:

In case the filter should be applied at the pre-match extension point, i.e. before any request matching has been performed by JAX-RS runtime, the filter MUST be annotated with a @PreMatching annotation.

So the filter is invoked before the incoming request has been matched to a particular resource by the JAX-RS runtime, and therefore the path parameters are empty.

So I guess you need to remove the @PreMatching annotation.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!