
For inserting batch of cars, you need to call insert() method multiple times, the update will be very slow as the SQL statement will be compiled repeatedly. Instead, we can add a new method insertCars() in CarsDao for inserting a batch of Cars.
The JdbcTemplate class offers the batchUpdate() template method for batch update operations. It requires two arguments, a SQL ...
Posted under #Spring. Read full article from Stacktips.
Follow author on twitter https://twitter.com/npanigrahy.
No comments:
Post a Comment