INT-4291: Post-merge polishing
JIRA: https://jira.spring.io/browse/INT-4291 * Fix code style in the `ExpressionEvaluatingSqlParameterSourceFactory` * Remove redundant `ExpressionEvaluatingSqlParameterSourceFactory.registerSqlTypes` in favor of the direct access to the `sqlParametersTypes` from the `ExpressionEvaluatingSqlParameterSource` ctor * Reformat code style in the `pollingWithSelectParameterSourceJdbcInboundChannelAdapterTest.xml` * Fix code style in the `ExpressionEvaluatingSqlParameterSourceFactoryTests` * Polishing `whats-new.adoc` for proper formatting and single link from the section to the particular chapter * Fix formatting and wording in the `jdbc.adoc`
This commit is contained in:
@@ -36,7 +36,8 @@ import org.springframework.jdbc.support.JdbcUtils;
|
||||
*/
|
||||
public class ExpressionEvaluatingSqlParameterSourceFactoryTests {
|
||||
|
||||
private final ExpressionEvaluatingSqlParameterSourceFactory factory = new ExpressionEvaluatingSqlParameterSourceFactory();
|
||||
private final ExpressionEvaluatingSqlParameterSourceFactory factory =
|
||||
new ExpressionEvaluatingSqlParameterSourceFactory();
|
||||
|
||||
@Test
|
||||
public void testSetStaticParameters() throws Exception {
|
||||
@@ -145,4 +146,5 @@ public class ExpressionEvaluatingSqlParameterSourceFactoryTests {
|
||||
assertEquals("[BAR, BUCKET]", source.getValue(expression).toString());
|
||||
assertEquals(JdbcUtils.TYPE_UNKNOWN, source.getSqlType("spam"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,38 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/integration/jdbc"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:si="http://www.springframework.org/schema/integration"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
xmlns:beans="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/integration
|
||||
http://www.springframework.org/schema/integration/spring-integration.xsd
|
||||
http://www.springframework.org/schema/integration/jdbc
|
||||
http://www.springframework.org/schema/integration/jdbc/spring-integration-jdbc.xsd">
|
||||
|
||||
<inbound-channel-adapter query="select * from item where status=:status" channel="target"
|
||||
data-source="dataSource" select-sql-parameter-source="parameterSource"
|
||||
update="delete from item" />
|
||||
|
||||
<beans:import resource="jdbcInboundChannelAdapterCommonConfig.xml" />
|
||||
|
||||
<beans:bean id="parameterSource" factory-bean="parameterSourceFactory" factory-method="createParameterSourceNoCache">
|
||||
<beans:constructor-arg value="" />
|
||||
<inbound-channel-adapter query="select * from item where status=:status" channel="target"
|
||||
data-source="dataSource" select-sql-parameter-source="parameterSource"
|
||||
update="delete from item"/>
|
||||
|
||||
<beans:import resource="jdbcInboundChannelAdapterCommonConfig.xml"/>
|
||||
|
||||
<beans:bean id="parameterSource" factory-bean="parameterSourceFactory"
|
||||
factory-method="createParameterSourceNoCache">
|
||||
<beans:constructor-arg value=""/>
|
||||
</beans:bean>
|
||||
|
||||
<beans:bean id="parameterSourceFactory" class="org.springframework.integration.jdbc.ExpressionEvaluatingSqlParameterSourceFactory">
|
||||
<beans:bean id="parameterSourceFactory"
|
||||
class="org.springframework.integration.jdbc.ExpressionEvaluatingSqlParameterSourceFactory">
|
||||
<beans:property name="parameterExpressions">
|
||||
<beans:map>
|
||||
<beans:entry key="status" value="@statusBean.which()" />
|
||||
<beans:entry key="status" value="@statusBean.which()"/>
|
||||
</beans:map>
|
||||
</beans:property>
|
||||
<beans:property name="sqlParameterTypes">
|
||||
<beans:map>
|
||||
<beans:entry key="status" value="#{ T(java.sql.Types).INTEGER}" />
|
||||
</beans:map>
|
||||
<beans:entry key="status" value="#{ T(java.sql.Types).INTEGER}"/>
|
||||
</beans:map>
|
||||
</beans:property>
|
||||
</beans:bean>
|
||||
|
||||
<beans:bean id="statusBean" class="org.springframework.integration.jdbc.config.JdbcPollingChannelAdapterParserTests$Status" />
|
||||
<beans:bean id="statusBean"
|
||||
class="org.springframework.integration.jdbc.config.JdbcPollingChannelAdapterParserTests$Status"/>
|
||||
|
||||
</beans:beans>
|
||||
|
||||
Reference in New Issue
Block a user