0

任何人都可以帮助了解 spelsource 的重要性吗?

<bean id="spelSource" 
        class="org.springframework.integration.jdbc.ExpressionEvaluatingSqlParameterSourceFactory"> 
        <property name="parameterExpressions"> 
                <map> 
                        <entry key="payload" value="payload.getDDA_XML_MESSAGE()" /> 
                </map> 
        </property> 
</bean> 
4

1 回答 1

0

我得到了上述问题的答案,在spring集成框架中使用spelsource动态读取数据并将其传递到属性文件中。如下图所示。

<int-jdbc:outbound-channel-adapter 
            channel="com.db.jdbc.serviceactivator.output" data-source="dataSource" 
            query="${int.jdbc.poller.outbound.ddaout.update.query}" 
            sql-parameter-source-factory="SpelSource" /> 

    <bean id="SpelSource" 
            class="org.springframework.integration.jdbc.ExpressionEvaluatingSqlParameterSourceFactory"> 
            <property name="parameterExpressions"> 
                    <map> 
                            <entry key="dda_rid_dda" value="payload.getMMI_RID_MSG_IN()" /> 
                            <entry key="response" value="headers.updateflag" /> 
                    </map> 
            </property> 
    </bean> 
于 2013-12-12T06:17:44.090 回答