27 Temmuz 2020 Pazartesi

Camel ServletComponent Sınıfı

Giriş
Örneğin veri POST edilebilecek bir URL yaratır

Örnek
Şöyle yaparız
camel:
 springboot:
  name: gateway
 component:
  servlet:
   mapping:
    enabled: true
    context-path: /*
  mail:
   basic-property-binding: true
Örnek
Açıklaması şöyle
... the Java DSL given below will create a REST endpoint which will be able to accept an XML consisting of List of Products and splits it into multiple products and invoke Process method of BrandProcessor with it. And just by adding .parallelProcessing it will parallel process all the Product Objects. (Product class is JAXB/XJC generated Java stub from the XSD which the input xml is confined to.) 
Şöyle yaparız
from("servlet:item-delta?matchOnUriPrefix=true&httpMethodRestrict=POST")
.routeId("Item-DeltaRESTRoute")
.log(LoggingLevel.INFO, "Item Delta received on Item-DeltaRESTRoute")
.split(stax(Product.class))
.parallelProcessing()
.process(itemDeltaProcessor);

Hiç yorum yok:

Yorum Gönder