使用jdbc的Spring集成轮询器
想要实现一些事情,比如使用jdbc的Spring集成轮询器,spring,jdbc,Spring,Jdbc,想要实现一些事情,比如 <int-jdbc:inbound-channel-adapter id="selectNUpdate" query="select * from table1 where col1='abc' and rownum=1" update="update table1 set col2=0 where id in (:id)" data-source="dataSource"> <int:poller max-messag
<int-jdbc:inbound-channel-adapter id="selectNUpdate"
query="select * from table1 where col1='abc' and rownum=1"
update="update table1 set col2=0 where id in (:id)"
data-source="dataSource">
<int:poller max-messages-per-poll="1"
fixed-rate="3000" />
</int-jdbc:inbound-channel-adapter>
我只想执行一个select查询,并根据记录更新同一表中的记录。
问题是:在上面的SpringXML中,若我不给出channel=则它会失败,异常情况是订户通道未配置
实现这一点的方法是什么,即使用jdbc进行选择和更新的一些轮询器不清楚为什么不能直接使用JdbcTemplate进行选择和更新
但是为了回答你的问题,我可以建议使用内置的nullChannel谢谢Artem。你能推荐一些东西吗谢谢Artem它为我做的工作。。。。你能推荐一些好的Spring集成教程吗?抱歉,回复太晚了。如果有效,请接受答案,结束问题。SpringIO站点是一个很好的教程。好书是《Spring集成在行动》