package org.ssm.dufy.web.controll;
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 org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.ssm.dufy.entity.UserPO;
import org.ssm.dufy.service.UserService;
@Controller
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@RequestMapping("/showname")
public String showUserName(@RequestParam("uid") int uid, HttpServletRequest request, Model model) {
System.out.println("showname");
UserPO user = userService.findUserById(uid);
if (user != null) {
request.setAttribute("name", user.getUser_name());
model.addAttribute("mame", user.getUser_name());
return "showName";
}
request.setAttribute("error", "没有找到该用户!");
return "error";
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
SSM框架——Spring+SpringMVC+Mybatis的搭建教程源码
共45个文件
xml:16个
properties:5个
java:5个
需积分: 12 42 下载量 28 浏览量
2017-11-12
16:32:36
上传
评论
收藏 37KB ZIP 举报
温馨提示
SSM框架——Spring+SpringMVC+Mybatis的搭建教程
资源推荐
资源详情
资源评论
收起资源包目录
ssm Maven Webapp.zip (45个子文件)
ssm Maven Webapp
pom.xml 6KB
target
test-classes
m2e-jee
web-resources
META-INF
maven
ssm
ssm
pom.xml 6KB
pom.properties 218B
MANIFEST.MF 114B
classes
jdbc.properties 402B
log4j.properties 2KB
spring
applicationContext-dao.xml 943B
spring-mvc.xml 1KB
applicationContext-service.xml 1KB
applicationContext.xml 5KB
mybatis
SqlMapConfig.xml 460B
.settings
org.eclipse.m2e.core.prefs 90B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.xml 296B
org.eclipse.core.resources.prefs 89B
org.eclipse.wst.common.component 760B
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.validation.prefs 50B
.jsdtscope 639B
org.eclipse.jdt.core.prefs 430B
src
test
java
main
webapp
WEB-INF
test-classes
web.xml 3KB
resources
classes
org
ssm
dufy
dao
UserMapper.class 272B
UserMapper.xml 471B
web
controll
UserController.class 2KB
service
UserService.class 202B
impl
UserServiceImpl.class 744B
entity
UserPO.class 1KB
jsp
error.jsp 833B
showName.jsp 852B
index.jsp 57B
resources
jdbc.properties 402B
log4j.properties 2KB
spring
applicationContext-dao.xml 943B
spring-mvc.xml 1KB
applicationContext-service.xml 1KB
applicationContext.xml 5KB
mybatis
SqlMapConfig.xml 460B
java
org
ssm
dufy
dao
UserMapper.java 241B
UserMapper.xml 471B
web
controll
UserController.java 1KB
service
UserService.java 250B
impl
UserServiceImpl.java 683B
entity
UserPO.java 856B
.project 1KB
.classpath 1KB
共 45 条
- 1
资源评论
小咪儿六六
- 粉丝: 67
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- date0425111111111111111111111
- 包含贪心算法的定义及python代码部分实现
- 自动驾驶-状态估计和定位之扩展卡尔曼滤波.pdf
- csdn之x-ca-key,x-ca-nonce,x-ca-signature与x-ca-signature-headers探索
- 基于TM1620数码显示芯片STM32单片机驱动程序软件源代码.zip
- 【tomcat6使用redis配置session共享】
- 包含杨辉三角的说明及java代码实现
- FDN371N-NL-VB一款SOT23封装N-Channel场效应MOS管
- AutomotiveSPICE-V4.0 中文版
- Java实现杨辉三角的生成和打印代码示例.md
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功