getJdbcTemplate().batchUpdate的

2023-05-04,,

执行getJdbcTemplate().batchUpdate需要在ServiceImpl类中添加事务注解(@Transactional(rollbackFor=Exception.class))

@Transactional(rollbackFor=Exception.class)
public void updateMenu(String[] objs) throws Exception {
	repository.updateSomething(objs);//这里调用了批处理
}

《getJdbcTemplate().batchUpdate的.doc》

下载本文的Word格式文档,以方便收藏与打印。