From 695641bc39f27b5f2caaf6329da8c593f89d3ca9 Mon Sep 17 00:00:00 2001 From: 30424 <3042423074@qq.com> Date: Thu, 27 Mar 2025 21:57:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=80=E6=9C=89=E8=B5=84=E6=BA=90=E5=B7=B2?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=EF=BC=8C=E4=BB=BB=E5=8A=A1=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/com/ssm/controller/FirstController.java | 9 ++------- src/com/ssm/controller/LabxController.java | 7 ++++--- web/WEB-INF/view/showLaboratory.jsp | 3 ++- web/addLaboratory.jsp | 15 +-------------- web/first.jsp | 8 +------- 5 files changed, 10 insertions(+), 32 deletions(-) diff --git a/src/com/ssm/controller/FirstController.java b/src/com/ssm/controller/FirstController.java index 1618ff1..5abfb9b 100644 --- a/src/com/ssm/controller/FirstController.java +++ b/src/com/ssm/controller/FirstController.java @@ -5,14 +5,9 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller -@RequestMapping("testFC") public class FirstController { - @RequestMapping("object") - public String hello(Cate cate) { - System.out.println("cateid:"+cate.getCateid()); - System.out.println("catename:"+cate.getCatename()); - System.out.println("addtime:"+cate.getAddtime()); - System.out.println("memo:"+cate.getMemo()); + @RequestMapping("hello") + public String hello() { return "showFirst"; } } diff --git a/src/com/ssm/controller/LabxController.java b/src/com/ssm/controller/LabxController.java index 63ff9a0..622ac66 100644 --- a/src/com/ssm/controller/LabxController.java +++ b/src/com/ssm/controller/LabxController.java @@ -11,12 +11,13 @@ public class LabxController { //对象方式接收数据,ModelAndView对象响应数据 @RequestMapping("add") - public ModelAndView test(Labx laboratory){ + public ModelAndView test(Labx laboratory) { //创建ModelAndView对象的同时设置了view的信息 ModelAndView mv=new ModelAndView("showLaboratory"); //将这个对象laboratory保存到ModelAndView对象中 mv.addObject("laboratoryInfo", laboratory); return mv; - } - } +} + + diff --git a/web/WEB-INF/view/showLaboratory.jsp b/web/WEB-INF/view/showLaboratory.jsp index 40ffdcd..bd5b740 100644 --- a/web/WEB-INF/view/showLaboratory.jsp +++ b/web/WEB-INF/view/showLaboratory.jsp @@ -8,7 +8,8 @@ Success! -
+ +
实验室编号:${laboratoryInfo.labxid}
实验室名称:${laboratoryInfo.labxname} diff --git a/web/addLaboratory.jsp b/web/addLaboratory.jsp index 9e336cc..3966e9d 100644 --- a/web/addLaboratory.jsp +++ b/web/addLaboratory.jsp @@ -7,19 +7,6 @@ 添加实验室信息 -
- 实验室编号: -
- 实验室名称: -
- 负责人: -
- 联系方式: -
- 地址: -
- -
- +Hello world! \ No newline at end of file diff --git a/web/first.jsp b/web/first.jsp index 3df2b06..550d02d 100644 --- a/web/first.jsp +++ b/web/first.jsp @@ -7,12 +7,6 @@ showFirst! -
- 设备类型:
- 类型名称:
- 创建日期:
- 备注: - -
+hello world \ No newline at end of file