1. 程式人生 > >基於SpringMVC和Hibernate的教材管理子系統的開發,基於java的畢業設計

基於SpringMVC和Hibernate的教材管理子系統的開發,基於java的畢業設計

**基於SpringMVC和Hibernate的教材管理子系統的開發,基於java的畢業設計** 基於SpringMVC和Hibernate的教材管理子系統的開發登入註冊介面

基於SpringMVC和Hibernate的教材管理子系統的開發mysql資料庫版本原始碼:

超級管理員表建立語句如下:


create table t_admin(
	id int primary key auto_increment comment '主鍵',
	username varchar(100) comment '超級管理員賬號',
	password varchar(100) comment '超級管理員密碼'
) comment '超級管理員';
insert into t_admin(username,password) values('admin','123456');

採購計劃表建立語句如下:


create table t_cgjh(
	id int primary key auto_increment comment '主鍵',
	jcId int comment '教材',
	num int comment '數量',
	cgjhDate varchar(100) comment '採購日期'
) comment '採購計劃';

教材表建立語句如下:


create table t_jc(
	id int primary key auto_increment comment '主鍵',
	jcName varchar(100) comment '教材名稱',
	jcBh varchar(100) comment '教材編號',
	jg int comment '價格',
	kc int comment '庫存'
) comment '教材';

教材報損表建立語句如下:


create table t_jcbs(
	id int primary key auto_increment comment '主鍵',
	jcId int comment '教材',
	bsNum int comment '數量',
	bz varchar(100) comment '備註'
) comment '教材報損';

學生領書表建立語句如下:


create table t_stubook(
	id int primary key auto_increment comment '主鍵',
	studentId int comment '學生',
	num int comment '數量',
	jcId int comment '教材',
	lsDate varchar(100) comment '領書日期'
) comment '學生領書';

學生表建立語句如下:


create table t_student(
	id int primary key auto_increment comment '主鍵',
	username varchar(100) comment '賬號',
	password varchar(100) comment '密碼',
	studentName varchar(100) comment '姓名',
	xb varchar(100) comment '系別'
) comment '學生';

老師表建立語句如下:


create table t_teacher(
	id int primary key auto_increment comment '主鍵',
	username varchar(100) comment '賬號',
	password varchar(100) comment '密碼',
	teacherName varchar(100) comment '老師姓名'
) comment '老師';

老師領書表建立語句如下:


create table t_tecbook(
	id int primary key auto_increment comment '主鍵',
	teacherId varchar(100) comment '老師',
	num int comment '數量',
	jcId int comment '教材',
	lsDate varchar(100) comment '領書日期'
) comment '老師領書';

推薦教材表建立語句如下:


create table t_tjjc(
	id int primary key auto_increment comment '主鍵',
	jcId int comment '教材',
	xb varchar(100) comment '系別'
) comment '推薦教材';

基於SpringMVC和Hibernate的教材管理子系統的開發oracle資料庫版本原始碼:

超級管理員表建立語句如下:


create table t_admin(
	id integer,
	username varchar(100),
	password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超級管理員欄位加註釋
comment on column t_admin.id is '主鍵';
comment on column t_admin.username is '超級管理員賬號';
comment on column t_admin.password is '超級管理員密碼';
--超級管理員表加註釋
comment on table t_admin is '超級管理員';

採購計劃表建立語句如下:


create table t_cgjh(
	id integer,
	jcId int,
	num int,
	cgjhDate varchar(100)
);
--採購計劃欄位加註釋
comment on column t_cgjh.id is '主鍵';
comment on column t_cgjh.jcId is '教材';
comment on column t_cgjh.num is '數量';
comment on column t_cgjh.cgjhDate is '採購日期';
--採購計劃表加註釋
comment on table t_cgjh is '採購計劃';

教材表建立語句如下:


create table t_jc(
	id integer,
	jcName varchar(100),
	jcBh varchar(100),
	jg int,
	kc int
);
--教材欄位加註釋
comment on column t_jc.id is '主鍵';
comment on column t_jc.jcName is '教材名稱';
comment on column t_jc.jcBh is '教材編號';
comment on column t_jc.jg is '價格';
comment on column t_jc.kc is '庫存';
--教材表加註釋
comment on table t_jc is '教材';

教材報損表建立語句如下:


create table t_jcbs(
	id integer,
	jcId int,
	bsNum int,
	bz varchar(100)
);
--教材報損欄位加註釋
comment on column t_jcbs.id is '主鍵';
comment on column t_jcbs.jcId is '教材';
comment on column t_jcbs.bsNum is '數量';
comment on column t_jcbs.bz is '備註';
--教材報損表加註釋
comment on table t_jcbs is '教材報損';

學生領書表建立語句如下:


create table t_stubook(
	id integer,
	studentId int,
	num int,
	jcId int,
	lsDate varchar(100)
);
--學生領書欄位加註釋
comment on column t_stubook.id is '主鍵';
comment on column t_stubook.studentId is '學生';
comment on column t_stubook.num is '數量';
comment on column t_stubook.jcId is '教材';
comment on column t_stubook.lsDate is '領書日期';
--學生領書表加註釋
comment on table t_stubook is '學生領書';

學生表建立語句如下:


create table t_student(
	id integer,
	username varchar(100),
	password varchar(100),
	studentName varchar(100),
	xb varchar(100)
);
--學生欄位加註釋
comment on column t_student.id is '主鍵';
comment on column t_student.username is '賬號';
comment on column t_student.password is '密碼';
comment on column t_student.studentName is '姓名';
comment on column t_student.xb is '系別';
--學生表加註釋
comment on table t_student is '學生';

老師表建立語句如下:


create table t_teacher(
	id integer,
	username varchar(100),
	password varchar(100),
	teacherName varchar(100)
);
--老師欄位加註釋
comment on column t_teacher.id is '主鍵';
comment on column t_teacher.username is '賬號';
comment on column t_teacher.password is '密碼';
comment on column t_teacher.teacherName is '老師姓名';
--老師表加註釋
comment on table t_teacher is '老師';

老師領書表建立語句如下:


create table t_tecbook(
	id integer,
	teacherId varchar(100),
	num int,
	jcId int,
	lsDate varchar(100)
);
--老師領書欄位加註釋
comment on column t_tecbook.id is '主鍵';
comment on column t_tecbook.teacherId is '老師';
comment on column t_tecbook.num is '數量';
comment on column t_tecbook.jcId is '教材';
comment on column t_tecbook.lsDate is '領書日期';
--老師領書表加註釋
comment on table t_tecbook is '老師領書';

推薦教材表建立語句如下:


create table t_tjjc(
	id integer,
	jcId int,
	xb varchar(100)
);
--推薦教材欄位加註釋
comment on column t_tjjc.id is '主鍵';
comment on column t_tjjc.jcId is '教材';
comment on column t_tjjc.xb is '系別';
--推薦教材表加註釋
comment on table t_tjjc is '推薦教材';

oracle特有,對應序列如下:


create sequence s_t_cgjh;
create sequence s_t_jc;
create sequence s_t_jcbs;
create sequence s_t_stubook;
create sequence s_t_student;
create sequence s_t_teacher;
create sequence s_t_tecbook;
create sequence s_t_tjjc;

基於SpringMVC和Hibernate的教材管理子系統的開發sqlserver資料庫版本原始碼:

超級管理員表建立語句如下:


--超級管理員
create table t_admin(
	id int identity(1,1) primary key not null,--主鍵
	username varchar(100),--超級管理員賬號
	password varchar(100)--超級管理員密碼
);
insert into t_admin(username,password) values('admin','123456');

採購計劃表建立語句如下:


--採購計劃表註釋
create table t_cgjh(
	id int identity(1,1) primary key not null,--主鍵
	jcId int,--教材
	num int,--數量
	cgjhDate varchar(100)--採購日期
);

教材表建立語句如下:


--教材表註釋
create table t_jc(
	id int identity(1,1) primary key not null,--主鍵
	jcName varchar(100),--教材名稱
	jcBh varchar(100),--教材編號
	jg int,--價格
	kc int--庫存
);

教材報損表建立語句如下:


--教材報損表註釋
create table t_jcbs(
	id int identity(1,1) primary key not null,--主鍵
	jcId int,--教材
	bsNum int,--數量
	bz varchar(100)--備註
);

學生領書表建立語句如下:


--學生領書表註釋
create table t_stubook(
	id int identity(1,1) primary key not null,--主鍵
	studentId int,--學生
	num int,--數量
	jcId int,--教材
	lsDate varchar(100)--領書日期
);

學生表建立語句如下:


--學生表註釋
create table t_student(
	id int identity(1,1) primary key not null,--主鍵
	username varchar(100),--賬號
	password varchar(100),--密碼
	studentName varchar(100),--姓名
	xb varchar(100)--系別
);

老師表建立語句如下:


--老師表註釋
create table t_teacher(
	id int identity(1,1) primary key not null,--主鍵
	username varchar(100),--賬號
	password varchar(100),--密碼
	teacherName varchar(100)--老師姓名
);

老師領書表建立語句如下:


--老師領書表註釋
create table t_tecbook(
	id int identity(1,1) primary key not null,--主鍵
	teacherId varchar(100),--老師
	num int,--數量
	jcId int,--教材
	lsDate varchar(100)--領書日期
);

推薦教材表建立語句如下:


--推薦教材表註釋
create table t_tjjc(
	id int identity(1,1) primary key not null,--主鍵
	jcId int,--教材
	xb varchar(100)--系別
);

基於SpringMVC和Hibernate的教材管理子系統的開發登入後主頁

基於SpringMVC和Hibernate的教材管理子系統的開發spring springMVC hibernate框架物件(javaBean,pojo)設計:

採購計劃javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//採購計劃
@Table(name = "t_cgjh")
public class Cgjh {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材
private Integer jcId;
//數量
private Integer num;
//採購日期
private String cgjhDate;
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public Integer getNum() {return num;}
public void setNum(Integer num) {this.num = num;}
public String getCgjhDate() {return cgjhDate;}
public void setCgjhDate(String cgjhDate) {this.cgjhDate = cgjhDate;}
}

教材javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//教材
@Table(name = "t_jc")
public class Jc {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材名稱
private String jcName;
//教材編號
private String jcBh;
//價格
private Integer jg;
//庫存
private Integer kc;
public String getJcName() {return jcName;}
public void setJcName(String jcName) {this.jcName = jcName;}
public String getJcBh() {return jcBh;}
public void setJcBh(String jcBh) {this.jcBh = jcBh;}
public Integer getJg() {return jg;}
public void setJg(Integer jg) {this.jg = jg;}
public Integer getKc() {return kc;}
public void setKc(Integer kc) {this.kc = kc;}
}

教材報損javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//教材報損
@Table(name = "t_jcbs")
public class Jcbs {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材
private Integer jcId;
//數量
private Integer bsNum;
//備註
private String bz;
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public Integer getBsNum() {return bsNum;}
public void setBsNum(Integer bsNum) {this.bsNum = bsNum;}
public String getBz() {return bz;}
public void setBz(String bz) {this.bz = bz;}
}

學生領書javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//學生領書
@Table(name = "t_stubook")
public class Stubook {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//學生
private Integer studentId;
//數量
private Integer num;
//教材
private Integer jcId;
//領書日期
private String lsDate;
public Integer getStudentId() {return studentId;}
public void setStudentId(Integer studentId) {this.studentId = studentId;}
public Integer getNum() {return num;}
public void setNum(Integer num) {this.num = num;}
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public String getLsDate() {return lsDate;}
public void setLsDate(String lsDate) {this.lsDate = lsDate;}
}

學生javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//學生
@Table(name = "t_student")
public class Student {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//賬號
private String username;
//密碼
private String password;
//姓名
private String studentName;
//系別
private String xb;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getStudentName() {return studentName;}
public void setStudentName(String studentName) {this.studentName = studentName;}
public String getXb() {return xb;}
public void setXb(String xb) {this.xb = xb;}
}

老師javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//老師
@Table(name = "t_teacher")
public class Teacher {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//賬號
private String username;
//密碼
private String password;
//老師姓名
private String teacherName;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getTeacherName() {return teacherName;}
public void setTeacherName(String teacherName) {this.teacherName = teacherName;}
}

老師領書javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//老師領書
@Table(name = "t_tecbook")
public class Tecbook {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//老師
private String teacherId;
//數量
private Integer num;
//教材
private Integer jcId;
//領書日期
private String lsDate;
public String getTeacherId() {return teacherId;}
public void setTeacherId(String teacherId) {this.teacherId = teacherId;}
public Integer getNum() {return num;}
public void setNum(Integer num) {this.num = num;}
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public String getLsDate() {return lsDate;}
public void setLsDate(String lsDate) {this.lsDate = lsDate;}
}

推薦教材javaBean建立語句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity
//推薦教材
@Table(name = "t_tjjc")
public class Tjjc {
//主鍵
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材
private Integer jcId;
//系別
private String xb;
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public String getXb() {return xb;}
public void setXb(String xb) {this.xb = xb;}
}

基於SpringMVC和Hibernate的教材管理子系統的開發spring springMVC mybatis框架物件(javaBean,pojo)設計:

採購計劃javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//採購計劃
public class Cgjh  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材
private Integer jcId;
//數量
private Integer num;
//採購日期
private String cgjhDate;
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public Integer getNum() {return num;}
public void setNum(Integer num) {this.num = num;}
public String getCgjhDate() {return cgjhDate;}
public void setCgjhDate(String cgjhDate) {this.cgjhDate = cgjhDate;}
}

教材javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//教材
public class Jc  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材名稱
private String jcName;
//教材編號
private String jcBh;
//價格
private Integer jg;
//庫存
private Integer kc;
public String getJcName() {return jcName;}
public void setJcName(String jcName) {this.jcName = jcName;}
public String getJcBh() {return jcBh;}
public void setJcBh(String jcBh) {this.jcBh = jcBh;}
public Integer getJg() {return jg;}
public void setJg(Integer jg) {this.jg = jg;}
public Integer getKc() {return kc;}
public void setKc(Integer kc) {this.kc = kc;}
}

教材報損javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//教材報損
public class Jcbs  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材
private Integer jcId;
//數量
private Integer bsNum;
//備註
private String bz;
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public Integer getBsNum() {return bsNum;}
public void setBsNum(Integer bsNum) {this.bsNum = bsNum;}
public String getBz() {return bz;}
public void setBz(String bz) {this.bz = bz;}
}

學生領書javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//學生領書
public class Stubook  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//學生
private Integer studentId;
//數量
private Integer num;
//教材
private Integer jcId;
//領書日期
private String lsDate;
public Integer getStudentId() {return studentId;}
public void setStudentId(Integer studentId) {this.studentId = studentId;}
public Integer getNum() {return num;}
public void setNum(Integer num) {this.num = num;}
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public String getLsDate() {return lsDate;}
public void setLsDate(String lsDate) {this.lsDate = lsDate;}
}

學生javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//學生
public class Student  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//賬號
private String username;
//密碼
private String password;
//姓名
private String studentName;
//系別
private String xb;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getStudentName() {return studentName;}
public void setStudentName(String studentName) {this.studentName = studentName;}
public String getXb() {return xb;}
public void setXb(String xb) {this.xb = xb;}
}

老師javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//老師
public class Teacher  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//賬號
private String username;
//密碼
private String password;
//老師姓名
private String teacherName;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getTeacherName() {return teacherName;}
public void setTeacherName(String teacherName) {this.teacherName = teacherName;}
}

老師領書javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//老師領書
public class Tecbook  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//老師
private String teacherId;
//數量
private Integer num;
//教材
private Integer jcId;
//領書日期
private String lsDate;
public String getTeacherId() {return teacherId;}
public void setTeacherId(String teacherId) {this.teacherId = teacherId;}
public Integer getNum() {return num;}
public void setNum(Integer num) {this.num = num;}
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public String getLsDate() {return lsDate;}
public void setLsDate(String lsDate) {this.lsDate = lsDate;}
}

推薦教材javaBean建立語句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
//推薦教材
public class Tjjc  extends BaseBean{
//主鍵
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//教材
private Integer jcId;
//系別
private String xb;
public Integer getJcId() {return jcId;}
public void setJcId(Integer jcId) {this.jcId = jcId;}
public String getXb() {return xb;}
public void setXb(String xb) {this.xb = xb;}
}