Spring integration spring在查询属性中集成动态sql

Spring integration spring在查询属性中集成动态sql,spring-integration,Spring Integration,如何在int jdbc:outbound gateway中注入sql以查询属性 背景: 我收到一条带有where子句的amqp消息,用于查询表并执行一些逻辑。Where子句可以是类似于('ca','ma)中的state或zipcode='01760' 是否有使用int-jdbc:outbound gateway传递查询的示例,该查询可以根据收到的消息进行更改 例如: 我们收到amqp消息: 1:{“whereClause”:“在('ca','ma')中声明”} 2:{“whereClause”:

如何在int jdbc:outbound gateway中注入sql以查询属性

背景: 我收到一条带有where子句的amqp消息,用于查询表并执行一些逻辑。Where子句可以是类似于('ca','ma)中的state或zipcode='01760' 是否有使用int-jdbc:outbound gateway传递查询的示例,该查询可以根据收到的消息进行更改

例如: 我们收到amqp消息: 1:{“whereClause”:“在('ca','ma')中声明”} 2:{“whereClause”:“id=1”}

我如何在int jdbc:outbound gateway中注入查询属性,如下所示

query=“从状态为('ca','ma')的帐户中选择id”
query=“SELECT id FROM account where id=1”

否,使用现成的Spring集成JDBC组件无法做到这一点

query
属性是
final
,无法在运行时更改


考虑将
JdbcTemplate.query()
直接使用。

不,使用现成的Spring集成JDBC组件无法做到这一点

query
属性是
final
,无法在运行时更改

考虑将
JdbcTemplate.query()
直接使用