1.制作简单用户注册html页面 保存在SpringBoot项目resources目录中static目录下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>用户注册</title>
</head>
<body>
<center>
<h1>用户注册</h1>
<!--
<form>:表单,用于将用户在页面上输入的信息提交给服务端的组件。
form中有两个重要的属性:method,action
action:用于指定表单提交到哪里(拟定一个路径,该路径需要服务端配合处理)
method:表单提交方式,有两种:GET,POST.不指定时默认为GET提交。
GET,POST不缺分大小写
GET形式提交表单时。表单中个输入框内容会被拼接到抽象路径的"?"右侧。
具体格式为:输入框1的名字=输入框内容&输入框2的名字=输入框内容&...
"?"左侧为请求路径,对应的是action指定的路径。
最终实体提交是如下:
http://localhost:8080/reg.html
http://localhost:8080/regUser?username=范传奇&password=123456&nickname=传奇&age=22
-->
<form action="/regUser" method="get">
<table border="1">
<tr>
<td>用户名</td>
<!-- 输入框必须要使用name属性指定名字,否则表单提交时会忽略 -->
<td><input name="username" type="text"></td>
</tr>
<tr>
<td>密码</td>
<td><input name="password" type="password"></td>
</tr>
<tr>
<td>昵称</td>
<td><input name="nickname" type="text"></td>
</tr>
<tr>
<td>年龄</td>
<td><input name="age" type="text"></td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="注册">
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
2.制作简单用户登录html页面 保存在SpringBoot项目resources目录中static目录下
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>用户登录</title>
</head>
<body>
<center>
<h1>用户登录</h1>
<form action="/loginUser" method="get">
<table border="1">
<tr>
<td>用户名</td>
<td><input name="user