AbstractAddressingEndpointMapping(AnnotationActionEndpointMapping的祖先)从BeanFactory中检索所有SmartInterceptor并将它们分配给实例变量。稍后MessageDispatcher(SoapMessageDispatcher)在映射上调用getEndpoint()(从它自己的getEndpoint()方法中调用)。 AbstractAddressingEndpointMapping.getEndpoint()调用自己的私有getEndpointInvocationChain()方法,该方法使用所有拦截器创建SoapEndpointInvocationChain的新实例。它永远不会在拦截器上调用shouldIntercept()来确定它是否应该添加到链中。
将此内容与SoapActionAnnotationMethodEndpointMapping合并,后者继承自AbstractEndpointMapping,它在检索SmartInterceptors方面做同样的事情。但是,它的getEndpoint()方法实际上在每个拦截器上调用了shouldIntercept(),并且只添加了返回true的链接。 AnnotationActionEndpointMapping和SoapActionAnnotationMethodEndpointMapping具有不同的祖先,因此它们的处理明显不同。
所以问题是 - 是否有正确的方法为AnnotationActionEndpointMapping配置SmartInterceptors?
答案 0 :(得分:0)
我认为这是一个错误:AnnotationActionEndpointMapping
也应该在其智能拦截链上调用shouldIntercept
。你能为这个here创建一个JIRA,可能链接到这个SO问题吗?或者更好的是,提供pull request?