当前位置:Gxlcms > 数据库问题 > getJdbcTemplate().batchUpdate的性能优化

getJdbcTemplate().batchUpdate的性能优化

时间: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

人气教程排行