【发布时间】:2015-09-08 14:21:52
【问题描述】:
在 Spring Integration Java DSL 中使用 WSInboundGateway 时,有没有办法提取标头(其值)并使用它来填充枚举?
我试过了,但 SpEL 没有评估:
@Bean
public IntegrationFlow aFlow() {
return IntegrationFlows.from(aWSInboundGateway())
.transform(
new GenericTransformer<JAXBElement<SomeStruct>, SpecificEvent>() {
@Override
public SpecificEvent transform(JAXBElement<SomeStruct> payload) {
return new SpecificEvent(
payload.getValue(),
Source.valueOf("headers['source']")
);
}
})
.channel(someChannel())
.get();
}
【问题讨论】:
标签: java spring-integration spring-ws spring-dsl