2
我找的例子有注解的类,完全XML免费的这样:JDBC Spring集成与注解
<int-jdbc:inbound-channel-adapter query="select * from item where status=2"
channel="target" data-source="dataSource"
update="update item set status=10 where id in (:id)" />
OR
<int-jdbc:inbound-channel-adapter query="..."
channel="target" data-source="dataSource" update="...">
<int:poller fixed-rate="1000">
<int:transactional/>
</int:poller>
</int-jdbc:inbound-channel-adapter>
也许存在一个更好的解决方案,如输入消息网关通过使用CRON语句查询数据库来创建入口点。 克朗编程查询 - >第一通道
它的工作原理!非常感谢。在这一刻,我想了解poller.setAdviceChain(Collections.singletonList(interceptor))的含义。我收到一个错误,因为它期待着一个不同的类型: PollerMetadata类型中的setAdviceChain(List)方法不适用于参数(List ) –
crm86
2014-12-02 15:04:02
试试这个'poller.setAdviceChain(Collections。 singletonList拦截器));' - 方法的预期泛型。 –
2014-12-02 15:07:10
@Artem Bilan:如何获得您在第二个片段中提到的'transactionManager'?谢谢。 – 2018-03-10 01:16:47