使用spring和jdbc模板事务实现

1、创建实体类:

Role

package com.wbg.sjt.entity;

public class Role {
    private int id;
    private String roleName;
    private String note;


    @Override
    public String toString() {
        return "Role{" +
                "id=" + id +
                ", roleName='" + roleName + '\'' +
                ", note='" + note + '\'' +
                '}';
    }

    public Role() {
    }

    public Role(int id, String roleName, String note) {
        this.id = id;
        this.roleName = roleName;
        this.note = note;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getNote() {
        return note;
    }

    public void setNote(String note) {
        this.note = note;
    }
}
View Code

相关文章:

  • 2021-08-27
  • 2021-07-12
  • 2019-11-18
  • 2021-08-19
  • 2021-12-20
猜你喜欢
  • 2021-08-30
  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-10-10
相关资源
相似解决方案