执行getJdbcTemplate().batchUpdate需要在ServiceImpl类中添加事务注解(@Transactional(rollbackFor=Exception.class))
@Transactional(rollbackFor=Exception.class)
public void updateMenu(String[] objs) throws Exception {
repository.updateSomething(objs);//这里调用了批处理
}getJdbcTemplate().batchUpdate的性能优化
原文地址:http://lipeng1207.blog.51cto.com/1388975/1749183