骆驼3.0平方米丢失的方法与课堂:路由定义



我看到,在较旧版本的骆驼中,人们通常使用位于类:RouteDefinition的方法adviceWith,但在版本3.0 m2中 - 不存在此方法。

https://camel.apache.org/advicewith.html

        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-spring-boot</artifactId>
            <version>3.0.0-M2</version>
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-swagger-java</artifactId>
            <version>3.0.0-M2</version>
            <!-- use the same version as your Camel core version -->
        </dependency>
        <dependency>
            <groupId>org.apache.camel</groupId>
            <artifactId>camel-rabbitmq</artifactId>
            <version>3.0.0-M2</version>
            <!-- use the same version as your Camel core version -->
        </dependency>

在DOC中搜索RouteDefinition类和方法adviceWith

1(https://www.javadoc.io/doc/org.apache.camel/camel-core/3.0.0.0.0-m2

这里不存在

2(https://www.javadoc.io/doc/org.apache.camel/camel-core/2.24.0

这里是

从问题中,尚不清楚您的真实问题是什么。我假设,您正在寻找相当于骆驼中的RouteDefinition.adviceWith的3.0

在v3.0.0-m2中,routereifier.advisewith是您要寻找的。

骆驼3.0是一个主要版本,相当多的API已更改为2.x。 RouteDefinition.adviceWith是迁移指南中记录的这些情况之一。

在骆驼3.11中再次发生了变化,在官方示例中,只有lambda式的建议使用似乎是编译的。

最新更新