package com.tiansu.controller;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.tiansu.entity.UserEntity;
import com.tiansu.service.IUserService;
@Controller
public class UserController {
@Autowired
private IUserService userService;
@RequestMapping("view/login.do")
public String getAllUser(HttpServletRequest request,Model model) {
String username = request.getParameter("username");
String password = request.getParameter("password");
UserEntity user = new UserEntity();
user.setPassword(password);
user.setUsername(username);
UserEntity loginUser = userService.login(user);
if(null != loginUser){
model.addAttribute("username", loginUser.getUsername());
return "/success";
}
return "/error";
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SpringMVC_MyBatis.rar (54个子文件)
SpringMVC_MyBatis
.settings
com.genuitec.runtime.libraries.xml 212B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.xml 398B
org.eclipse.core.resources.prefs 71B
org.eclipse.wst.common.component 486B
org.eclipse.wst.jsdt.ui.superType.container 49B
.jsdtscope 522B
org.eclipse.jdt.core.prefs 364B
src
config
mybatis-config.xml 697B
spring-mvc.xml 2KB
spring-common.xml 2KB
com
tiansu
mapper
UserMapper.java 383B
UserMapper.xml 1KB
controller
UserController.java 992B
service
IUserService.java 386B
impl
UserServiceImpl.java 695B
entity
UserEntity.java 760B
.project 1KB
WebRoot
META-INF
MANIFEST.MF 39B
WEB-INF
web.xml 2KB
classes
config
mybatis-config.xml 697B
spring-mvc.xml 2KB
spring-common.xml 2KB
com
tiansu
mapper
UserMapper.class 200B
UserMapper.xml 1KB
controller
UserController.class 2KB
service
IUserService.class 205B
impl
UserServiceImpl.class 776B
entity
UserEntity.class 994B
lib
mybatis-3.1.1-SNAPSHOT.jar 635KB
asm-3.3.1.jar 43KB
org.springframework.beans-3.1.1.RELEASE.jar 576KB
aopalliance-1.0.jar 4KB
org.springframework.context-3.1.1.RELEASE.jar 812KB
org.springframework.asm-3.1.1.RELEASE.jar 52KB
commons-logging-1.1.1.jar 59KB
org.springframework.core-3.1.1.RELEASE.jar 439KB
commons-dbcp-1.4.jar 157KB
org.springframework.jdbc-3.1.1.RELEASE.jar 395KB
org.springframework.expression-3.1.1.RELEASE.jar 172KB
commons-fileupload-1.2.2.jar 58KB
org.springframework.transaction-3.1.1.RELEASE.jar 241KB
mybatis-spring-1.1.1-SNAPSHOT.jar 40KB
org.springframework.aop-3.1.1.RELEASE.jar 324KB
commons-pool-1.6.jar 109KB
mysql-connector-java-5.1.18-bin.jar 771KB
org.springframework.web-3.1.1.RELEASE.jar 532KB
commons-io-1.4.jar 106KB
org.springframework.web.servlet-3.1.1.RELEASE.jar 560KB
view
login.jsp 1KB
error.jsp 816B
success.jsp 846B
index.jsp 834B
.classpath 801B
共 54 条
- 1
资源评论
- VoidAccelerator2016-11-26eclipse打不开 ?
- qq_416613112018-01-23资源没有?.............................
- qq_313259852015-10-12不错很好的例子
- 菜鸟技巧汇总2018-12-19挺好,不赖,挂意思
陆创科技
- 粉丝: 12
- 资源: 15
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 第十四届中北大学ACM程序设计竞赛.zip
- UIGF_200852355_202404242026.json
- 基于深度学习的对话系统、语音识别、机器翻译和语音合成等
- 基于STM32单片机的智能停车场设计源码+全部资料.zip
- 534springboot + vue 实验室管理系统.zip(可运行源码+数据库文件+文档)
- 基于Python+Opencv+keras的实时手势识别系统+源码+文档(期末大作业&课程设计&项目开发)
- 基于Python+joint-spider爬虫数据的成都二手房数据分析源码+详细使用说明.zip
- 基于YOLOv7-plate和CRNN的车牌号检测识别项目,使用PyQt构建了UI界面
- 基于LabView+MATLAB的说话人识别系统.zip
- 基于树莓派+OpenCV+Python语言的人脸识别+源码+开发文档(毕业设计&课程设计&项目开发)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功