parent
bb2f356c7b
commit
6cceb3cc73
@ -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";
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.ssm.controller;
|
||||
|
||||
import com.ssm.entity.Item;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
@RequestMapping("item")
|
||||
public class ItemController {
|
||||
|
||||
//对象方式接收花卉信息
|
||||
@RequestMapping("add")
|
||||
public String test(Item item){
|
||||
System.out.println("花卉信息:"+item.toString());
|
||||
return "showItem";
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
/**
|
||||
* 类目
|
||||
*/
|
||||
public class ItemCategory {
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
* 类目名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 父id
|
||||
*/
|
||||
private Integer pid;
|
||||
|
||||
/**
|
||||
* 是否已删除
|
||||
*/
|
||||
private Integer isDelete;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getPid() {
|
||||
return pid;
|
||||
}
|
||||
|
||||
public void setPid(Integer pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,12 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示入门程序信息</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,31 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示Controller接收及响应数据</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
商品信息已在控制台输出!
|
||||
<%--<br>--%>
|
||||
<%--商品名称:${productInfo.pname}--%>
|
||||
<%--<br>--%>
|
||||
<%--是否热门:${productInfo.isHot}--%>
|
||||
<%--<br>--%>
|
||||
<%--市场价格:${productInfo.marketPrice}--%>
|
||||
<%--<br>--%>
|
||||
<%--销售价格:${productInfo.shopPrice}--%>
|
||||
<%--<br>--%>
|
||||
<%--商品图片:${productInfo.image}--%>
|
||||
<%--<br>--%>
|
||||
<%--分类名称:${productInfo.category.cname}--%>
|
||||
<%--<br>--%>
|
||||
<%--商品描述:${productInfo.pdesc}--%>
|
||||
<%--<br>--%>
|
||||
<%--上架日期:${productInfo.pdate}--%>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,16 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>展示花卉类目信息</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
<br>
|
||||
类目编号:${itemCategoryInfo.id}
|
||||
<br>
|
||||
类目名称:${itemCategoryInfo.name}
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,19 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>添加花卉类目信息</title>
|
||||
</head>
|
||||
<body>
|
||||
<form action="itemCategory/add" method="post">
|
||||
类目编号:<input type="text" name="id">
|
||||
<br>
|
||||
类目名称:<input type="text" name="name">
|
||||
<br>
|
||||
<input type="submit" value="添加">
|
||||
</form>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,12 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>入门程序</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="hello">hello world</a>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue