4.13. XML RestーDSL の追加
デフォルトでは、Camel Rest-DSL XML ルートを camel-rest
ディレクトリー下のクラスパスに配置できます。これは、camel-spring-boot
が自動検出して組み込みます。以下のように設定オプションを使用して、ディレクトリー名を設定したり、この機能を無効にすることができます。
// turn off camel.springboot.xmlRests = false // scan in the com/foo/routes classpath camel.springboot.xmlRests = classpath:com/foo/rests/*.xml
注記
Rest-DSL XML ファイルは、以下のような CamelContext
ではなく Camel XML rest である必要があります。
<rests xmlns="http://camel.apache.org/schema/spring"> <rest> <post uri="/persons"> <to uri="direct:postPersons"/> </post> <get uri="/persons"> <to uri="direct:getPersons"/> </get> <get uri="/persons/{personId}"> <to uri="direct:getPersionId"/> </get> <put uri="/persons/{personId}"> <to uri="direct:putPersionId"/> </put> <delete uri="/persons/{personId}"> <to uri="direct:deletePersionId"/> </delete> </rest> </rests>