2016-07-29 82 views

回答

1

我認爲你正在尋找這樣的事情 Invoking Stored Procedure using Spring JdbcBatchItemWriter

答案是肯定的,實現它是直接給出下面的代碼:

JdbcBatchItemWriter<Person> writer = new JdbcBatchItemWriter<Person>(); 
    writer.setItemSqlParameterSourceProvider(new BeanPropertyItemSqlParameterSourceProvider<Person>()); 
    writer.setSql("CALL SP(:firstName, :lastName)"); 
    writer.setDataSource(dataSource); 
+0

感謝Alex.That幫了不少忙。 –

+0

怎麼樣upvote :) –