小编给大家分享一下使用SpringBoot注解方式处理事务回滚的方法,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!
我们在SpringBoot和MyBatis整合的时候,需要在SpringBoot中通过注解方式配置事务回滚
1 Pojo类
package com.zxf.domain; import java.util.Date; public class User { private Integer id; private String name; private String pwd; private String head_img; private String phone; private Date create_time; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPwd() { return pwd; } public void setPwd(String pwd) { this.pwd = pwd; } public String getHead_img() { return head_img; } public void setHead_img(String head_img) { this.head_img = head_img; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public Date getCreate_time() { return create_time; } public void setCreate_time(Date create_time) { this.create_time = create_time; } }