parent
8236c154a5
commit
c274f4ea1c
@ -0,0 +1,20 @@
|
||||
package com.ssm.controller;
|
||||
|
||||
import com.ssm.entity.Carousel;
|
||||
import com.ssm.entity.Messagemodule;
|
||||
import com.ssm.entity.User;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
@Controller
|
||||
@RequestMapping("hh")
|
||||
public class CarouselController {
|
||||
@RequestMapping("Carousel")
|
||||
public ModelAndView test(Carousel carousel){
|
||||
carousel.printInfo();
|
||||
System.out.println("轮播信息:"+carousel.toString());
|
||||
ModelAndView cl = new ModelAndView("showCarousel");
|
||||
cl.addObject("printInfo", carousel);
|
||||
return cl;
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.ssm.entity;
|
||||
public class Carousel {
|
||||
private String clid;//轮播id
|
||||
private String clpicture;//轮图片
|
||||
private String cldate;//轮播日期
|
||||
private String clcontent;//轮播内容
|
||||
|
||||
public String getClid() {
|
||||
return clid;
|
||||
}
|
||||
|
||||
public void setClid(String clid) {
|
||||
this.clid = clid;
|
||||
}
|
||||
|
||||
public String getClpicture() {
|
||||
return clpicture;
|
||||
}
|
||||
|
||||
public void setClpicture(String clpicture) {
|
||||
this.clpicture = clpicture;
|
||||
}
|
||||
|
||||
public String getCldate() {
|
||||
return cldate;
|
||||
}
|
||||
|
||||
public void setCldate(String cldate) {
|
||||
this.cldate = cldate;
|
||||
}
|
||||
|
||||
public String getClcontent() {
|
||||
return clcontent;
|
||||
}
|
||||
|
||||
public void setClcontent(String clcontent) {
|
||||
this.clcontent = clcontent;
|
||||
}
|
||||
public void printInfo(){
|
||||
System.out.println("轮播id="+clid +"\n轮播图片="+clpicture+"\n轮播日期="+cldate+"\n轮播内容="+clcontent);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: lenovo
|
||||
Date: 2025/4/2
|
||||
Time: 17:22
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>CarouselController</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
轮播id:${printInfo.clid}
|
||||
<br>
|
||||
<br>
|
||||
:轮播图片${printInfo.clpicture}
|
||||
<br>
|
||||
<br>
|
||||
轮播日期:${printInfo.cldate}
|
||||
<br>
|
||||
<br>
|
||||
轮播内容:${printInfo.clcontent}
|
||||
<br>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,44 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: lenovo
|
||||
Date: 2025/4/2
|
||||
Time: 17:27
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>添加轮播图片</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="hh/Carousel" method="post">
|
||||
<tr>
|
||||
<td>轮播id</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="clid" placeholder="轮播id"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>轮播图片</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="clpicture" placeholder="轮播图片"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>轮播日期</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="cldate" placeholder="轮播日期"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>轮播内容</td>
|
||||
<td width="20"></td>
|
||||
<td><input type="text" name="clcontent" placeholder="轮播内容"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right"><input type="reset" value="重置信息"></td>
|
||||
<td></td>
|
||||
<td align="center">
|
||||
<input type="submit" value="添加">
|
||||
</td>
|
||||
</tr>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue