springboot学习总结六(Spring boot下事务配置管理)

SpringBoot事务支持: 1.在入口类中使用@EnableTransactionManagement开启事务支持; 2.在访问数据库的Service方法上添加注解@Transactional即可 StudentService.java StudentServiceImpl.java MyBaitsController.java 执行结果分析: 除数不能为零,会抛出运行时异常,上一步的结果就会
相关文章
相关标签/搜索