package com.upsoft.ssm.controller;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import com.upsoft.ssm.entity.Student;
import com.upsoft.ssm.service.StudentService;
@Controller
@RequestMapping(value = "student")
public class StudentController {
@Resource
private StudentService studentService;
@RequestMapping(value = "findStudentById")
public String findStudentById(Integer id,Model model){
Student student = studentService.findStudentById(id);
model.addAttribute("student", student);
return "studentShow";
}
@RequestMapping(value = "updateStudent")
public String updateStudent(Student student,HttpServletRequest request){
System.out.println(request.getParameter("address"));
return "success";
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
spring+springmvc+mybatis整合代码
共45个文件
xml:11个
class:7个
java:7个
需积分: 9 63 下载量 78 浏览量
2016-11-23
15:38:31
上传
评论
收藏 61KB ZIP 举报
温馨提示
本资源对应博文:http://blog.csdn.net/u012789986/article/details/53305022,可以通过博文进行学习,博文有详细不走说明,以及代码。
资源推荐
资源详情
资源评论
收起资源包目录
ssm.zip (45个子文件)
ssm
pom.xml 5KB
target
test-classes
m2e-wtp
web-resources
META-INF
maven
com.upsoft
ssm
pom.xml 5KB
pom.properties 217B
MANIFEST.MF 103B
classes
spring-mybatis.xml 4KB
spring-mvc.xml 3KB
jdbc.properties 440B
com
upsoft
ssm
dao
StudentDAO.class 201B
converter
CustomDateConverter.class 1KB
mapping
StudentMapper.xml 909B
controller
TestController.class 967B
StudentController.class 2KB
service
StudentService.class 213B
impl
StudentServiceImpl.class 792B
entity
Student.class 1KB
.settings
org.eclipse.m2e.core.prefs 90B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.xml.bak 252B
org.eclipse.wst.common.project.facet.core.xml 346B
org.eclipse.core.resources.prefs 74B
org.eclipse.wst.common.component 566B
org.eclipse.wst.common.project.facet.core.prefs.xml 321B
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.validation.prefs 50B
.jsdtscope 575B
org.eclipse.jdt.core.prefs 430B
src
test
resources
java
main
webapp
img
WEB-INF
web.xml 2KB
jsp
test.jsp 258B
success.jsp 361B
studentShow.jsp 1KB
js
jquery-1.4.4.min.js 77KB
index.jsp 52B
resources
spring-mybatis.xml 4KB
spring-mvc.xml 3KB
jdbc.properties 440B
java
com
upsoft
ssm
dao
StudentDAO.java 229B
converter
CustomDateConverter.java 845B
mapping
StudentMapper.xml 909B
controller
StudentController.java 958B
TestController.java 520B
service
impl
StudentServiceImpl.java 479B
StudentService.java 334B
entity
Student.java 770B
.project 1KB
.classpath 1KB
共 45 条
- 1
资源评论
IT_Debug
- 粉丝: 10
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功