Apache camel REST API Camel的interreceptor

Apache camel REST API Camel的interreceptor,apache-camel,spring-camel,Apache Camel,Spring Camel,在camelcontext中,API以格式定义,Camel支持三种拦截器: 截取,截取每个处理步骤,同时 在路由中路由交换 interceptFrom(字符串uri),用于拦截路由中的传入交换 interceptSendToEndpoint,在Exchange即将启动时进行拦截 被发送到给定的端点 有几种方法可以为camel编写拦截器: class CustomInterceptingRoute extends CustomRouteBuilder{ void config

在camelcontext中,API以格式定义,Camel支持三种拦截器:

  • 截取,截取每个处理步骤,同时 在路由中路由交换

  • interceptFrom(字符串uri),用于拦截路由中的传入交换

  • interceptSendToEndpoint,在Exchange即将启动时进行拦截 被发送到给定的端点

  • 有几种方法可以为camel编写拦截器:

    class CustomInterceptingRoute extends CustomRouteBuilder{
            void configure() {
                interceptFrom('rest:*')...
            }
        }
    

    使用interceptFrom并指定模式。假设你之后直接去直达。因此,从uri=“direct:rest*”截取