getJdbcTemplate().batchUpdate的
执行getJdbcTemplate().batchUpdate需要在ServiceImpl类中添加事务注解(@Transactional(rollbackFor=Exception.class))
@Transactional(rollbackFor=Exception.class)publicvoidupdateMenu(String[]objs)throwsException{repository.updateSomething(objs);//这里调用了批处理}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。