时间:2021-07-01 10:21:17 帮助过:126人阅读
执行getJdbcTemplate().batchUpdate需要在ServiceImpl类中添加事务注解(@Transactional(rollbackFor=Exception.class))
@Transactional(rollbackFor=Exception.class)
public void updateMenu(String[] objs) throws Exception {
repository.updateSomething(objs);//这里调用了批处理
}getJdbcTemplate().batchUpdate的性能优化
标签:jdbc spring batch