【问题标题】:Interceptor for all calls in servicemixservicemix 中所有调用的拦截器
【发布时间】:2018-09-29 07:52:40
【问题描述】:

向 servicemix 添加一个拦截器以记录所有 web 服务调用(或对 osgi 组件的调用也可以工作)的最佳方法是什么?

我知道 NMR 拦截器,但这些显然不适用于 CXF。 而且我知道“jaxws:inInterceptors”,但这些需要手动添加到每个端点。

我想用一个配置/拦截器拦截对所有端点(WS 和 RS)的调用,这在 servicemix 中可行吗?

【问题讨论】:

    标签: interceptor apache-servicemix


    【解决方案1】:

    你可以像这样添加CXF logging feature

    <!-- adding the feature to the bus-->
    <cxf:bus>
        <cxf:features>
            <cxf:logging/>
        </cxf:features>
    </cxf:bus> 
    

    【讨论】:

    • 嘿,谢谢,这是很棒的信息。可能正是我需要的。如果我需要添加“全局”自定义功能(例如日志记录除外),这里有更多信息 cxf.apache.org/docs/bus-configuration.html
    猜你喜欢
    • 2011-10-16
    • 1970-01-01
    • 2019-10-05
    • 1970-01-01
    • 1970-01-01
    • 2018-06-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多