Java DSL for Spring Integration 1.2 Milestone 2 发布了,用于集成Spring的Java DSL。(至于什么是DSL,这个翻译成中文称作领域特定语言,具体的话请各位自行使用搜索引擎查找吧,我也爱莫能助了。)
目前迭代更新的一些亮点:
JPA support
@Autowired private EntityManagerFactory entityManagerFactory; @Bean public IntegrationFlow pollingAdapterFlow() { return IntegrationFlows .from(Jpa.inboundAdapter(this.entityManagerFactory) .entityClass(StudentDomain.class) .maxResults(1) .expectSingleResult(true), e -> e.poller(p -> p.trigger(new OnlyOnceTrigger()))) .channel(c -> c.queue("pollingResults")) .get(); } @Bean public IntegrationFlow updatingGatewayFlow() { return f -> f .handle(Jpa.updatingGateway(this.entityManagerFactory), e -> e.transactional(true)) .channel(c -> c.queue("persistResults")); } @Bean public IntegrationFlow retrievingGatewayFlow() { return f -> f .handle(Jpa.retrievingGateway(this.entityManagerFactory) .jpaQuery("from Student s where s.id = :id") .expectSingleResult(true) .parameterExpression("id", "payload")) .channel(c -> c.queue("retrieveResults")); }
Mid-flow transaction support
Scatter-Gather support
More routers improvements
点击查看提交记录以了解更多
发行说明:
下载地址: