Rest Filter:在SERVER运行时中注册,不实现SERVER运行时中适用的任何提供程序接口 [英] Rest Filter : registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime

查看:906
本文介绍了Rest Filter:在SERVER运行时中注册,不实现SERVER运行时中适用的任何提供程序接口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误:

在SERVER中注册的提供者com.xyx.in.astra.aqr.security.application.requestFilter.UniversalSessionManagerFilter
运行时不实现SERVER运行时中适用的任何提供程序接口。
由于约束配置问题,将忽略提供者
com.xyx.in.astra.aqr.security.application.requestFilter.UniversalSessionManagerFilter。

A provider com.xyx.in.astra.aqr.security.application.requestFilter.UniversalSessionManagerFilter registered in SERVER runtime does not implement any provider interfaces applicable in the SERVER runtime. Due to constraint configuration problems the provider com.xyx.in.astra.aqr.security.application.requestFilter.UniversalSessionManagerFilter will be ignored.

注意:
1)此UniversalSessionManagerFilter过滤器位于服务器类路径中的外部jar文件中
2)我在过滤器和@Priority注释上使用@Provider注释来定义优先级
3 )这是休息服务器过滤器

NOTE : 1) This UniversalSessionManagerFilter filter is in external jar file which is in the server classpath 2) I am using @Provider annotation on the filter and @Priority annotation to define priority 3) This is rest server filter

推荐答案

这在泽西岛被报道为一个问题。请参阅泽西岛问题#3700

This has been reported as an issue in Jersey. See Jersey issue #3700.

如果直接在 ResourceConfig 上注册实例化资源对象,则使用Jersey 2.26会触发警告消息。但是,警告是故意的。

With Jersey 2.26 the warning message is triggered if you register an instantiated resource object directly on a ResourceConfig. However, the warning is intentional.

您可以注册一个类而不是一个实例。或者您可以通过配置资源 AbstractBinder 功能

You can register a class instead of an instance. Or you can configure the resource via an AbstractBinder and a Feature.

如果警告实际上来自在<$>上注册资源实例的第三方库c $ c> ResourceConfig ,您可以通过抑制来自 org.glassfish.jersey.internal.inject.Providers 记录器的日志消息来解决此问题。推荐在泽西岛门票中。

If the warning actually originates from a third-party library registering a resource instance on a ResourceConfig, you can work around it by suppressing log messages from the org.glassfish.jersey.internal.inject.Providers logger as recommended in the Jersey ticket.

这篇关于Rest Filter:在SERVER运行时中注册,不实现SERVER运行时中适用的任何提供程序接口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆