package com.ysh.logintest.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class LoginController {
@PostMapping("login")
public ModelAndView login(
@RequestParam("loginName") String loginName,
@RequestParam("password") String password,
ModelAndView mv){
System.out.println("LoginController login方法被调用......");
System.out.println("LoginController 登录名:"+loginName + " 密码:" + password);
// 重定向到到main请求
mv.setViewName("redirect:/main");
return mv;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
SpringBoot开发第一个Web应用代码
共47个文件
css:6个
java:5个
class:5个
3星 · 超过75%的资源 需积分: 29 44 下载量 143 浏览量
2018-07-09
11:11:10
上传
评论
收藏 374KB ZIP 举报
温馨提示
SpringBoot开发第一个Web应用代码,SpringBoot开发第一个Web应用代码
资源推荐
资源详情
资源评论
收起资源包目录
logintest.zip (47个子文件)
logintest
src
main
resources
templates
main.html 9KB
index.html 3KB
static
fonts
glyphicons-halflings-regular.woff2 18KB
glyphicons-halflings-regular.ttf 44KB
glyphicons-halflings-regular.woff 23KB
glyphicons-halflings-regular.svg 106KB
glyphicons-halflings-regular.eot 20KB
js
jquery-1.11.0.min.js 94KB
bootstrap.min.js 36KB
css
bootstrap-theme.min.css 25KB
dashboard.css 2KB
bootstrap.min.css 135KB
img
application.properties 260B
java
com
ysh
logintest
App.java 474B
controller
LoginController.java 736B
MainController.java 430B
IndexController.java 555B
test
java
com
ysh
logintest
AppTest.java 683B
.classpath 1KB
.settings
org.eclipse.wst.common.project.facet.core.prefs.xml 172B
org.eclipse.wst.common.project.facet.core.xml 170B
org.eclipse.m2e.core.prefs 90B
org.eclipse.core.resources.prefs 155B
org.eclipse.jdt.core.prefs 430B
pom.xml 2KB
target
classes
META-INF
MANIFEST.MF 262B
maven
org.fkit
logintest
pom.properties 231B
pom.xml 2KB
com
ysh
logintest
controller
MainController.class 787B
IndexController.class 870B
LoginController.class 1KB
App.class 669B
templates
main.html 9KB
index.html 3KB
static
fonts
glyphicons-halflings-regular.woff2 18KB
glyphicons-halflings-regular.ttf 44KB
glyphicons-halflings-regular.woff 23KB
glyphicons-halflings-regular.svg 106KB
glyphicons-halflings-regular.eot 20KB
js
jquery-1.11.0.min.js 94KB
bootstrap.min.js 36KB
css
bootstrap-theme.min.css 25KB
dashboard.css 2KB
bootstrap.min.css 135KB
img
application.properties 260B
test-classes
com
ysh
logintest
AppTest.class 621B
.project 975B
共 47 条
- 1
资源评论
- 帅气刘德华2018-10-18资源很好,学习了,谢谢
- qiudehuo2018-10-17学习了SpringBoot开发第一个Web应用代码
霸道流氓气质
- 粉丝: 1w+
- 资源: 589
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功