gpt4 book ai didi

java - 配置 SoapActionSmartEndpointInterceptor 和 AnnotationActionEndpointMapping 的正确方法是什么

转载 作者:太空宇宙 更新时间:2023-11-04 14:20:17 24 4
gpt4 key购买 nike

AbstractAddressingEndpointMapping(AnnotationActionEndpointMapping 的祖先)从 BeanFactory 检索所有 SmartInterceptors 并将它们分配给实例变量。随后,MessageDispatcher (SoapMessageDispatcher) 在映射上调用 getEndpoint()(从其自己的 getEndpoint() 方法中)。 AbstractAddressingEndpointMapping.getEndpoint() 调用其自己的私有(private) getEndpointInitationChain() 方法,该方法创建包含所有拦截器的 SoapEndpointInvocationChain 的新实例。它从不调用拦截器上的shouldIntercept()来确定是否应该将其添加到链中。

将其契约为 SoapActionAnnotationMethodEndpointMapping,它继承自 AbstractEndpointMapping,它在检索 SmartInterceptors 方面执行相同的操作。然而,它的 getEndpoint() 方法实际上在每个拦截器上调用 shouldIntercept() ,并且只将返回 true 的拦截器添加到其链中。 AnnotationActionEndpointMapping 和 SoapActionAnnotationMethodEndpointMapping 具有不同的祖先,因此它们的处理方式明显不同。

所以问题是——是否有正确的方法来为 AnnotationActionEndpointMapping 配置 SmartInterceptors?

最佳答案

我认为这是一个错误:AnnotationActionEndpointMapping 还应该在其智能拦截器链上调用 shouldIntercept。您可以为此创建一个 JIRA here ,可能链接到这个SO问题?或者更好的是,提供 pull request

关于java - 配置 SoapActionSmartEndpointInterceptor 和 AnnotationActionEndpointMapping 的正确方法是什么,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27276302/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com