唐诗作业7已交

main
Wangyixin 4 months ago committed by TangShi
parent 6c6e052812
commit 021cdde5ef

@ -40,4 +40,5 @@
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

@ -1,5 +1,4 @@
jmn<%--
<%--
Created by IntelliJ IDEA.
User: Wangyixin
Date: 2025/4/2

@ -0,0 +1,20 @@
package com.ssm.controller;
import com.ssm.entity.User;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("yonghuguanli")
public class YonghuguanliController {
@RequestMapping("object")
public String object(User user){
System.out.println("userID:"+user.getUserID());
System.out.println("username:"+user.getUserName());
System.out.println("userPassword:"+user.getUserPassword());
System.out.println("usernumber:"+user.getUserNumber());
return "showYonghuguanli";
}
}

@ -0,0 +1,40 @@
package com.ssm.entity;
public class User {
private String userID;
private String userName;
private String userPassword;
private String userNumber;
public String getUserID() {
return userID;
}
public void setUserID(String userID) {
this.userID = userID;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPassword() {
return userPassword;
}
public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
}
public String getUserNumber() {
return userNumber;
}
public void setUserNumber(String userNumber) {
this.userNumber = userNumber;
}
}

@ -0,0 +1,19 @@
<%--
Created by IntelliJ IDEA.
User: 5300 PC 二合一
Date: 2025/4/2
Time: 19:47
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
<title>Title</title>
</head>
<body>
Success!
信息已在控制台输出!
</body>
</html>

@ -39,5 +39,6 @@
<filter-name>characterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>

@ -0,0 +1,29 @@
<%--
Created by IntelliJ IDEA.
User: 5300 PC 二合一
Date: 2025/4/2
Time: 19:41
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<head>
<title>用户管理</title>
</head>
<body>
<form action="yonghuguanli/object" method="post">
用户编号:<input type="text" name="userID">
<br>
用户姓名:<input type="text" name="userName">
<br>
用户密码:<input type="text" name="userPassword">
<br>
用户电话:<input type="text" name="userNumber">
<br>
<input type="submit" value="添加">
</form>
</body>
</html>

@ -1,5 +1,4 @@
jmn<%--
<%--
Created by IntelliJ IDEA.
User: Wangyixin
Date: 2025/4/2

Loading…
Cancel
Save