Jakarta ee Websphere 8.5上侦听器的CDI错误

Jakarta ee Websphere 8.5上侦听器的CDI错误,jakarta-ee,websphere,cdi,java-ee-6,websphere-8,Jakarta Ee,Websphere,Cdi,Java Ee 6,Websphere 8,我刚刚在WebSphere8.5.5上启用了CDI并添加了拦截器 在beans.xml文件中 <?xml version="1.0"?> <beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance" xsi:schemeLocation="http://java.sun.com/xml/ns/javaee http:// java.s

我刚刚在WebSphere8.5.5上启用了CDI并添加了拦截器

在beans.xml文件中

<?xml version="1.0"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"
xsi:schemeLocation="http://java.sun.com/xml/ns/javaee http://
java.sun.com/xml/ns/javaee/beans_1_0.xsd">
<interceptors>
    <class>com.example.jaxrs.SecurityChecked</class>
</interceptors>
</beans>
在JAX-RS类中,如下所示

@GET
@com.example.jaxrs.SecurityChecked
public String checkInterceptor(String hello) {
    return "Hello world!";
}
当我部署EAR时,我得到以下错误

WebContainerL I WebContainerLifecycle startApplication OpenWebBeans容器正在启动

[10/15/14 14:53:15:259 EDT]00000067 BeansDeployer E BeansDeployer deploy org.apache.webbeans.exception.webbeans配置异常:给定类:接口com.example.jaxrs.SecurityChecked不是拦截器类


有什么建议会导致这个错误吗

错误消息说明了一切
SecurityChecked
不是一个拦截器,而是一个用于拦截器绑定的注释。拦截器是
SecurityCheckInterceptor
,因此您的beans.xml应该包含:

<interceptors>
    <class>com.example.jaxrs.SecurityCheckInterceptor</class>
</interceptors>

com.example.jaxrs.SecurityCheckInterceptor
问候,

Svetlin

错误消息说明了一切
SecurityChecked
不是一个拦截器,而是一个用于拦截器绑定的注释。拦截器是
SecurityCheckInterceptor
,因此您的beans.xml应该包含:

<interceptors>
    <class>com.example.jaxrs.SecurityCheckInterceptor</class>
</interceptors>

com.example.jaxrs.SecurityCheckInterceptor
问候,

Svetlin

错误消息说明了一切
SecurityChecked
不是一个拦截器,而是一个用于拦截器绑定的注释。拦截器是
SecurityCheckInterceptor
,因此您的beans.xml应该包含:

<interceptors>
    <class>com.example.jaxrs.SecurityCheckInterceptor</class>
</interceptors>

com.example.jaxrs.SecurityCheckInterceptor
问候,

Svetlin

错误消息说明了一切
SecurityChecked
不是一个拦截器,而是一个用于拦截器绑定的注释。拦截器是
SecurityCheckInterceptor
,因此您的beans.xml应该包含:

<interceptors>
    <class>com.example.jaxrs.SecurityCheckInterceptor</class>
</interceptors>

com.example.jaxrs.SecurityCheckInterceptor
问候,

斯维特林

OOPS!我的错,让我来解决。谢谢如果它解决了问题,请考虑接受我的回答:“哎呀!我的错,让我来解决。谢谢如果它解决了问题,请考虑接受我的回答:“哎呀!我的错,让我来解决。谢谢如果它解决了问题,请考虑接受我的回答:“哎呀!我的错,让我来解决。谢谢如果能解决问题,请接受我的回答: