第二次提交
This commit is contained in:
parent
d9176489dc
commit
1d1b7c703a
|
@ -0,0 +1,23 @@
|
|||
package com.zyx.springboot.springboot.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
public class loginController {
|
||||
|
||||
@RequestMapping("login")
|
||||
public String login(){
|
||||
|
||||
return "login.html";
|
||||
}
|
||||
|
||||
@RequestMapping("logincommit")
|
||||
public String logincommit(String username,String password){
|
||||
if(username.equals("admin")&&password.equals("123456"))
|
||||
{
|
||||
return "loginSucess.html";
|
||||
}
|
||||
return "loginFail.html";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package com.zyx.springboot.springboot.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
@Controller
|
||||
public class newsController {
|
||||
|
||||
@RequestMapping("news")
|
||||
public String news(){
|
||||
return "news.html";
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1> 登陆页面 </h1>
|
||||
<form th:action="@{/logincommit}" method="post">
|
||||
<input type="text" name="username" placeholder="用户名"><br/>
|
||||
<input type="password" name="password" placeholder="密码"><br/>
|
||||
<input type="submit" value="登陆"></input>
|
||||
</input>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>登陆失败</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>登陆成功</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>新闻页面············</h1>
|
||||
<div th:text="${newsid}"></div>
|
||||
<div th:src="${123.png}"></div>
|
||||
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue