diff --git a/src/com/ssm/controller/EquipController.java b/src/com/ssm/controller/EquipController.java
new file mode 100644
index 0000000..909735c
--- /dev/null
+++ b/src/com/ssm/controller/EquipController.java
@@ -0,0 +1,18 @@
+package com.ssm.controller;
+
+import com.ssm.entity.Equip;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping("equipment")
+public class EquipController {
+
+ //对象方式接收设备信息
+ @RequestMapping("add")
+ public String test(Equip equipment){
+ System.out.println("设备信息:"+equipment.toString());
+ return "showEquipment";
+ }
+
+}
diff --git a/src/com/ssm/controller/FirstController.java b/src/com/ssm/controller/FirstController.java
new file mode 100644
index 0000000..c08cd7e
--- /dev/null
+++ b/src/com/ssm/controller/FirstController.java
@@ -0,0 +1,13 @@
+package com.ssm.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+public class FirstController {
+ @RequestMapping("hello")
+ public String hello() {
+ System.out.println("1111");
+ return "showFirst";
+ }
+}
diff --git a/src/com/ssm/controller/LabxController.java b/src/com/ssm/controller/LabxController.java
new file mode 100644
index 0000000..63ff9a0
--- /dev/null
+++ b/src/com/ssm/controller/LabxController.java
@@ -0,0 +1,22 @@
+package com.ssm.controller;
+
+import com.ssm.entity.Labx;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.ModelAndView;
+
+@Controller
+@RequestMapping("laboratory")
+public class LabxController {
+
+ //对象方式接收数据,ModelAndView对象响应数据
+ @RequestMapping("add")
+ public ModelAndView test(Labx laboratory){
+ //创建ModelAndView对象的同时设置了view的信息
+ ModelAndView mv=new ModelAndView("showLaboratory");
+ //将这个对象laboratory保存到ModelAndView对象中
+ mv.addObject("laboratoryInfo", laboratory);
+ return mv;
+ }
+
+}
diff --git a/src/com/ssm/entity/Cate.java b/src/com/ssm/entity/Cate.java
new file mode 100644
index 0000000..c70dc5d
--- /dev/null
+++ b/src/com/ssm/entity/Cate.java
@@ -0,0 +1,46 @@
+package com.ssm.entity;
+
+// 设备类型表的实体类
+public class Cate {
+ private String cateid; // 设备类型id
+ private String catename; // 类型名称
+ private String addtime; // 创建日期
+ private String memo; // 备注
+
+ public String getCateid() {
+ return cateid;
+ }
+
+ public void setCateid(String cateid) {
+ this.cateid = cateid;
+ }
+
+ public String getCatename() {
+ return catename;
+ }
+
+ public void setCatename(String catename) {
+ this.catename = catename;
+ }
+
+ public String getAddtime() {
+ return addtime;
+ }
+
+ public void setAddtime(String addtime) {
+ this.addtime = addtime;
+ }
+
+ public String getMemo() {
+ return memo;
+ }
+
+ public void setMemo(String memo) {
+ this.memo = memo;
+ }
+
+ public void printMessage(){
+ System.out.println("this is Category");
+ }
+
+}
diff --git a/src/com/ssm/entity/Equip.java b/src/com/ssm/entity/Equip.java
new file mode 100644
index 0000000..78bfa61
--- /dev/null
+++ b/src/com/ssm/entity/Equip.java
@@ -0,0 +1,128 @@
+package com.ssm.entity;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+// 设备表的实体类
+public class Equip {
+ private String equipid; // 设备id
+ private String eno; // 设备号
+ private String equipname; // 设备名称
+ private String useinfo; // 设备作用
+ private String productor; // 生产厂商
+ private String price; // 采购金额
+ @DateTimeFormat(pattern = "yyyy-mm-dd")
+ private Date buydate; // 采购日期
+ private String manager; // 负责人
+ private String memo; // 备注
+ private Cate cate;// 多对一映射类
+ private Labx labx;// 多对一映射类
+
+ public String getEquipid() {
+ return equipid;
+ }
+
+ public void setEquipid(String equipid) {
+ this.equipid = equipid;
+ }
+
+ public String getEno() {
+ return eno;
+ }
+
+ public void setEno(String eno) {
+ this.eno = eno;
+ }
+
+ public String getEquipname() {
+ return equipname;
+ }
+
+ public void setEquipname(String equipname) {
+ this.equipname = equipname;
+ }
+
+ public String getUseinfo() {
+ return useinfo;
+ }
+
+ public void setUseinfo(String useinfo) {
+ this.useinfo = useinfo;
+ }
+
+ public String getProductor() {
+ return productor;
+ }
+
+ public void setProductor(String productor) {
+ this.productor = productor;
+ }
+
+ public String getPrice() {
+ return price;
+ }
+
+ public void setPrice(String price) {
+ this.price = price;
+ }
+
+ public Date getBuydate() {
+ return buydate;
+ }
+
+ public void setBuydate(Date buydate) {
+ this.buydate = buydate;
+ }
+
+ public String getManager() {
+ return manager;
+ }
+
+ public void setManager(String manager) {
+ this.manager = manager;
+ }
+
+ public String getMemo() {
+ return memo;
+ }
+
+ public void setMemo(String memo) {
+ this.memo = memo;
+ }
+
+ public Cate getCate() {
+ return cate;
+ }
+
+ public void setCate(Cate cate) {
+ this.cate = cate;
+ }
+
+ public Labx getLabx() {
+ return labx;
+ }
+
+ public void setLabx(Labx labx) {
+ this.labx = labx;
+ }
+
+ @Override
+ public String toString() {
+ return "Equipment{" +
+ "equipid=" + equipid +
+ ", equipname='" + equipname + '\'' +
+ ", eno=" + eno +
+ ", productor=" + productor +
+ ", price='" + price + '\'' +
+ ", buydate='" + buydate + '\'' +
+ ", manager=" + manager +
+ ", useinfo=" + useinfo +
+ // 输出设备分类名称
+ ", categoryName=" + cate.getCatename() +
+ // 输出设备所在实验室名称
+ ", categoryName=" + labx.getLabxname() +
+ '}';
+ }
+
+}
diff --git a/src/com/ssm/entity/Labx.java b/src/com/ssm/entity/Labx.java
new file mode 100644
index 0000000..895371f
--- /dev/null
+++ b/src/com/ssm/entity/Labx.java
@@ -0,0 +1,83 @@
+package com.ssm.entity;
+
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.util.Date;
+
+// 实验室表的实体类
+public class Labx {
+ private String labxid; // 实验室id
+ private String labxname; // 实验室名称
+ private String manager; // 负责人
+ private String contact; // 联系方式
+ private String address; // 实验室地址
+ @DateTimeFormat(pattern = "yyyy-mm-dd")
+ private Date addtime; // 创建日期
+ private String memo; // 备注
+
+
+
+ public String getLabxid() {
+ return labxid;
+ }
+
+ public void setLabxid(String labxid) {
+ this.labxid = labxid;
+ }
+
+ public String getLabxname() {
+ return labxname;
+ }
+
+ public void setLabxname(String labxname) {
+ this.labxname = labxname;
+ }
+
+ public String getManager() {
+ return manager;
+ }
+
+ public void setManager(String manager) {
+ this.manager = manager;
+ }
+
+ public String getContact() {
+ return contact;
+ }
+
+ public void setContact(String contact) {
+ this.contact = contact;
+ }
+
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public Date getAddtime() {
+ return addtime;
+ }
+
+ public void setAddtime(Date addtime) {
+ this.addtime = addtime;
+ }
+
+ public String getMemo() {
+ return memo;
+ }
+
+ public void setMemo(String memo) {
+ this.memo = memo;
+ }
+
+ public void printMessage(){
+ System.out.println("this is Laboratory");
+ }
+}
+
+
+
+
diff --git a/src/springmvc.xml b/src/springmvc.xml
new file mode 100644
index 0000000..a202e8b
--- /dev/null
+++ b/src/springmvc.xml
@@ -0,0 +1,25 @@
+
+