загрузить верблюжий "отдых" из xml - PullRequest
0 голосов
/ 15 июня 2019

Я пытаюсь загрузить определение верблюжьих маршрутов в XML в приведенной ниже форме.

 <restConfiguration bindingMode="auto" component="jetty" port="8080"/>  
     <rest path="/say" id="restSay">
     <get uri="/hello">
       <to uri="direct:hello"/>
     </get>
     <get uri="/bye" consumes="application/json">
       <to uri="direct:bye"/>
     </get>
     <post uri="/bye">
       <to uri="mock:update"/>
     </post>
   </rest>
   <route  id="direct:hello">
     <from uri="direct:hello"/>
     <transform>
       <constant>Hello World</constant>
     </transform>
   </route>
   <route  id="direct:bye">
     <from uri="direct:bye"/>
     <transform>
       <constant>Bye World</constant>
     </transform>
   </route>
</routes>

и считайте эти маршруты XML, используя форму: // Считайте маршруты из XML DSL

    RoutesDefinition routes = camelContext.loadRoutesDefinition(is);

«Маршруты», возвращенные в строке выше, вызвав «camelContext.loadRoutesDefinition (is"не имеет ссылки на маршрут 'rest', определенный в XML. Однако он содержит ссылки на маршруты, которые определены внутри тега. http://camel.465427.n5.nabble.com/Loading-routes-from-XML-files-with-Camel-2-4-0-td3340082.html https://www.programcreek.com/java-api-examples/?api=org.apache.camel.model.RoutesDefinition

Это основано не на пружинеприменение.

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...