parent
db0ad3d0b6
commit
f3bcf6ee39
@ -0,0 +1,38 @@
|
||||
package com.ssm.entity;
|
||||
|
||||
public class User {
|
||||
private String username;
|
||||
private int userage;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public int getUserage() {
|
||||
return userage;
|
||||
}
|
||||
|
||||
public void setUserage(int userage) {
|
||||
this.userage = userage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "User{" +
|
||||
"username='" + username + '\'' +
|
||||
", userage=" + userage +
|
||||
'}';
|
||||
}
|
||||
|
||||
public User(String username, int userage) {
|
||||
this.username = username;
|
||||
this.userage = userage;
|
||||
}
|
||||
|
||||
public User() {
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: DELL
|
||||
Date: 2026/4/27
|
||||
Time: 15:09
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>商品信息</title>
|
||||
<style>
|
||||
.result-container {
|
||||
width: 600px;
|
||||
margin: 20px auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.result-title {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.result-row {
|
||||
margin: 10px 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
.result-label {
|
||||
font-weight: bold;
|
||||
color: #555;
|
||||
}
|
||||
.success-message {
|
||||
color: green;
|
||||
text-align: center;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="result-container">
|
||||
<h2 class="result-title">商品添加成功!</h2>
|
||||
<p class="success-message">商品信息已成功提交到服务器</p>
|
||||
|
||||
<div class="result-row">
|
||||
<span class="result-label">商品编号:</span>
|
||||
<span>${product.productId}</span>
|
||||
</div>
|
||||
<div class="result-row">
|
||||
<span class="result-label">商品名称:</span>
|
||||
<span>${product.productName}</span>
|
||||
</div>
|
||||
<div class="result-row">
|
||||
<span class="result-label">是否热门:</span>
|
||||
<span>${product.isPopular}</span>
|
||||
</div>
|
||||
<div class="result-row">
|
||||
<span class="result-label">市场价格:</span>
|
||||
<span>${product.marketPrice} 元</span>
|
||||
</div>
|
||||
<div class="result-row">
|
||||
<span class="result-label">销售价格:</span>
|
||||
<span>${product.salesPrice} 元</span>
|
||||
</div>
|
||||
<div class="result-row">
|
||||
<span class="result-label">分类名称:</span>
|
||||
<span>${product.categoryName}</span>
|
||||
</div>
|
||||
<div class="result-row">
|
||||
<span class="result-label">商品描述:</span>
|
||||
<span>${product.description}</span>
|
||||
</div>
|
||||
<div class="result-row">
|
||||
<span class="result-label">上架日期:</span>
|
||||
<span>${product.listDate}</span>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -0,0 +1,116 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: DELL
|
||||
Date: 2026/4/27
|
||||
Time: 14:58
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>添加商品</title>
|
||||
<style>
|
||||
.form-container {
|
||||
width: 600px;
|
||||
margin: 20px auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.form-row {
|
||||
margin: 15px 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.form-row label {
|
||||
width: 120px;
|
||||
text-align: right;
|
||||
margin-right: 15px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.form-row input[type="text"],
|
||||
.form-row input[type="number"],
|
||||
.form-row select,
|
||||
.form-row textarea {
|
||||
flex: 1;
|
||||
padding: 5px 10px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.form-row textarea {
|
||||
height: 80px;
|
||||
resize: vertical;
|
||||
}
|
||||
.form-row input[type="file"] {
|
||||
flex: 1;
|
||||
}
|
||||
.button-row {
|
||||
margin: 20px 0 0 135px;
|
||||
}
|
||||
.button-row input[type="submit"],
|
||||
.button-row input[type="reset"] {
|
||||
padding: 8px 25px;
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 3px;
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
.button-row input[type="submit"]:hover,
|
||||
.button-row input[type="reset"]:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="form-container">
|
||||
<form action="${pageContext.request.contextPath}/product/addProduct.action" method="post" enctype="multipart/form-data">
|
||||
<div class="form-row">
|
||||
<label>商品编号:</label>
|
||||
<input type="text" name="productId" value="1" readonly style="background-color: #e8f0fe;">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>商品名称:</label>
|
||||
<input type="text" name="productName" value="菠萝">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>是否热门:</label>
|
||||
<select name="isPopular">
|
||||
<option value="是" selected>是</option>
|
||||
<option value="否">否</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>市场价格:</label>
|
||||
<input type="number" name="marketPrice" value="23" step="0.01" style="background-color: #e8f0fe;">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>销售价格:</label>
|
||||
<input type="number" name="salesPrice" value="23" step="0.01" style="background-color: #e8f0fe;">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>商品图片:</label>
|
||||
<input type="file" name="productImage">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>分类名称:</label>
|
||||
<input type="text" name="categoryName" value="水果">
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>商品描述:</label>
|
||||
<textarea name="description">菠萝.....</textarea>
|
||||
</div>
|
||||
<div class="form-row">
|
||||
<label>上架日期:</label>
|
||||
<input type="text" name="listDate" value="2025-3-25">
|
||||
</div>
|
||||
<div class="button-row">
|
||||
<input type="reset" value="重置">
|
||||
<input type="submit" value="添加">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -1,16 +0,0 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: HP
|
||||
Date: 2026/4/25
|
||||
Time: 10:54
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test RequestMapping!</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="testRM/onClass">1.Test RequestMapping可以标识在类的前面</a >
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: HP
|
||||
Date: 2026/4/25
|
||||
Time: 11:00
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test RequestMapping!</title>
|
||||
</head>
|
||||
<body>
|
||||
Success!
|
||||
</body>
|
||||
</html>
|
||||
@ -1,16 +0,0 @@
|
||||
<%--
|
||||
Created by IntelliJ IDEA.
|
||||
User: HP
|
||||
Date: 2026/4/25
|
||||
Time: 10:54
|
||||
To change this template use File | Settings | File Templates.
|
||||
--%>
|
||||
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
|
||||
<html>
|
||||
<head>
|
||||
<title>Test RequestMapping!</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="testRM/onClass">1.Test RequestMapping可以标识在类的前面</a >
|
||||
</body>
|
||||
</html>
|
||||
Binary file not shown.
Loading…
Reference in new issue