This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<bean id="TestCompositeWriter" | |
class="org.springframework.batch.item.support.CompositeItemWriter" | |
scope="step"> | |
<property name="delegates"> | |
<list> | |
<ref bean="TestWriter1"/> | |
<ref bean="TestWriter2"/> | |
</list> | |
</property> | |
</bean> | |
<bean id="TestWriter1" | |
class="org.springframework.batch.item.database.JdbcBatchItemWriter" | |
scope="step"> | |
<property name="assertUpdates" value="true" /> | |
<property name="itemSqlParameterSourceProvider"> | |
<bean class="org.springframework.batch.item.database.BeanPropertyItemSqlParameterSourceProvider" /> | |
</property> | |
<property name="sql" | |
value="INSERT INTO TB_TARGET1(NEW_COL1, NEW_COL2) | |
VALUES(:newCol1, :newCol2)" | |
/> | |
<property name="dataSource" ref="testDataSource" /> | |
</bean> | |
<bean id="TestWriter2" | |
class="org.springframework.batch.item.database.JdbcBatchItemWriter" | |
scope="step"> | |
<property name="assertUpdates" value="true" /> | |
<property name="itemSqlParameterSourceProvider"> | |
<bean class="org.springframework.batch.item.database.BeanPropertyItemSqlParameterSourceProvider" /> | |
</property> | |
<property name="sql" | |
value="INSERT INTO TB_TARGET2(NEW_COL1, NEW_COL3) | |
VALUES(:newCol1, :newCol3)" | |
/> | |
<property name="dataSource" ref="testDataSource" /> | |
</bean> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment