Jersy的SelectableEntityFiltering功能不起作用

时间:2016-07-26 08:58:41

标签: java jersey

我正在关注this example以在Jersey中启用动态过滤。

我的配置:

resourceConfig.register(JacksonFeature.class);
resourceConfig.register(SelectableEntityFilteringFeature.class);
resourceConfig.property(SelectableEntityFilteringFeature.QUERY_PARAM_NAME, "select");

然而,它似乎不起作用。使用select query-param不会选择指定的字段。另外,resourceConfig.isEnabled(SelectableEntityFilteringFeature.class)返回false。

以下是我的家属:

 <dependency org="org.glassfish.jersey.containers" name="jersey-container-jetty-http" rev="2.22.1"/>
 <dependency org="org.glassfish.jersey.containers" name="jersey-container-servlet-core" rev="2.22.1"/>
 <dependency org="org.glassfish.jersey.core" name="jersey-server" rev="2.22.1"/>
 <dependency org="org.glassfish.jersey.ext" name="jersey-bean-validation" rev="2.22.1"/>
 <dependency org="org.glassfish.jersey.media" name="jersey-media-multipart" rev="2.22.1"/>
 <dependency org="org.glassfish.jersey.ext" name="jersey-declarative-linking" rev="2.22.1"/>
 <dependency org="org.glassfish.jersey.ext" name="jersey-entity-filtering" rev="2.22.1"/>
 <dependency org="org.glassfish.jersey.media" name="jersey-media-json-jackson" rev="2.22.1"/>

0 个答案:

没有答案