Grails org.apache.camel.model.ThrottleDefinition不能强制转换为org.apache.camel.model.routeddefinition

Grails org.apache.camel.model.ThrottleDefinition不能强制转换为org.apache.camel.model.routeddefinition,grails,apache-camel,throttling,Grails,Apache Camel,Throttling,我正在尝试设置一个动态路线,在这里 但是,如果我在其他路由中包含路由,我似乎无法使用Java fluent builder语法向路由添加节流 如果我在grails app/routes中将throttle代码添加到routes中,代码工作得很好,但这不符合我在代码中使用的设置 | Error 2014-02-19 08:01:33,743 [pool-7-thread-1] ERROR context.GrailsContextLoader - Error executing bootstra

我正在尝试设置一个动态路线,在这里 但是,如果我在其他路由中包含路由,我似乎无法使用Java fluent builder语法向路由添加节流

如果我在grails app/routes中将throttle代码添加到routes中,代码工作得很好,但这不符合我在代码中使用的设置

| Error 2014-02-19 08:01:33,743 [pool-7-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: org.apache.camel.model.ThrottleDefinition cannot be cast to org.apache.camel.model.RouteDefinition Message: org.apache.camel.model.ThrottleDefinition cannot be cast to org.apache.camel.model.RouteDefinition Line | Method ->> 638 | addRouteDefinitions in org.apache.camel.impl.DefaultCamelContext - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 13 | doCall in BootStrap$_closure1 | 300 | evaluateEnvironmentSpecificBlock in grails.util.Environment | 293 | executeForEnvironment in '' | 269 | executeForCurrentEnvironment . . in '' | 303 | innerRun in java.util.concurrent.FutureTask$Sync | 138 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask | 895 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker | 918 | run . . . . . . . . . . . . . . in '' ^ 662 | run in java.lang.Thread |错误2014-02-19 08:01:33743[pool-7-thread-1]错误context.grailContextLoader-执行引导时出错:org.apache.camel.model.ThrottleDefinition无法强制转换为org.apache.camel.model.routeddefinition 消息:org.apache.camel.model.ThrottleDefinition不能强制转换为org.apache.camel.model.routeddefinition 直线法 ->>638 |在org.apache.camel.impl.DefaultCamelContext中添加路由定义 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - |13 |引导程序中的doCall$| closure1 |300 | grails.util.Environment中的evaluateEnvironmentSpecificBlock |293 |在“”中执行前环境 |269 |执行循环环境。在“ |303 |在java.util.concurrent.FutureTask$Sync中运行innerRun |138 |运行。在java.util.concurrent.FutureTask中 |895 | java.util.concurrent.ThreadPoolExecutor$Worker中的runTask |918 |运行。在“ ^662 |在java.lang.Thread中运行
你能详细解释一下代码吗。您在哪里构建动态路线?顺便说一句,该错误是有效的,因为它没有扩展/实现RouteDefinition。该代码是我正在构建的应用程序的仿制品,我希望能够在其中定义动态路由并将其添加到camelContext。这些路由可能具有限制。我也同意你的观点,节流定义并不扩展路由定义