-
大小: 15.68MB文件类型: .zip金币: 1下载: 0 次发布日期: 2023-07-06
- 语言: 其他
- 标签: springData jpa demo
资源简介
springdata-jpa demo
http://knight-black-bob.iteye.com/blog/2274879
代码片段和文件信息
package com.curiousby.action;
import java.util.List;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.curiousby.entity.User;
import com.curiousby.service.UserService;
@Controller
public class UserController {
@Autowired
UserService service;
@RequestMapping(value = “/userView.do“)
public String userView(ModelMap modelMapString pageNo String choice HttpSession session){
List userList = service.allUser();
modelMap.put(“userList“ userList);
return “back/jsp/user/userView“;
}
@RequestMapping(value = “/userDel{userId}.do“)
public String userDel(@PathVariable(“userId“)int userId ModelMap modelMapString pageNo String choice HttpSession session){
service.delUser(userId);
String message1=“删除成功“;
String message2=“请返回……“;
String url=“userView.do“;
modelMap.put(“message1“ message1);
modelMap.put(“message2“ message2);
modelMap.put(“url“ url);
return “infomationShow“;
}
@RequestMapping(value =“/userGoAdd.do“)
public String userGoAdd(ModelMap modelMapString pageNo String choice HttpSession session){
return “back/jsp/user/userAdd“;
}
@RequestMapping(value = “/userAdd.do“method=RequestMethod.POST)
public String userAdd(User formModelMap modelMapString pageNo String choice HttpSession session){
service.addUser(form);
String message1=“添加成功“;
String message2=“请返回……“;
String url=“userView.do“;
modelMap.put(“message1“ message1);
modelMap.put(“message2“ message2);
modelMap.put(“url“ url);
return “infomationShow“;
}
@RequestMapping(value = “/userGoUpdate{userId}.do“)
public String userGoUpdate(@PathVariable(“userId“)int userId ModelMap modelMapString pageNo String choice HttpSession session){
User user = service.user(userId);
modelMap.put(“user“ user);
return “back/jsp/user/userUpdate“;
}
@RequestMapping(value = “/userUpdate.do“method=RequestMethod.POST)
public String userUpdate(User formModelMap modelMapString pageNo String choice HttpSession session){
service.updateUser(form);
String message1=“修改成功“;
String message2=“请返回……“;
String url=“userView.do“;
modelMap.put(“message1“ message1);
modelMap.put(“message2“ message2);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-01-28 13:06 springData-jpa-demo\
文件 879 2016-01-28 13:06 springData-jpa-demo\.classpath
文件 1052 2016-01-28 13:02 springData-jpa-demo\.project
目录 0 2016-01-28 13:02 springData-jpa-demo\.settings\
文件 503 2016-01-28 13:02 springData-jpa-demo\.settings\.jsdtscope
文件 364 2016-01-28 13:02 springData-jpa-demo\.settings\org.eclipse.jdt.core.prefs
文件 586 2016-01-28 13:06 springData-jpa-demo\.settings\org.eclipse.wst.common.component
文件 345 2016-01-28 13:02 springData-jpa-demo\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2016-01-28 13:02 springData-jpa-demo\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2016-01-28 13:02 springData-jpa-demo\.settings\org.eclipse.wst.jsdt.ui.superType.name
目录 0 2016-01-28 13:02 springData-jpa-demo\build\
目录 0 2016-01-28 17:47 springData-jpa-demo\build\classes\
目录 0 2016-01-28 13:03 springData-jpa-demo\build\classes\com\
目录 0 2016-01-28 16:53 springData-jpa-demo\build\classes\com\curiousby\
目录 0 2016-01-28 13:16 springData-jpa-demo\build\classes\com\curiousby\action\
文件 3450 2016-01-28 17:10 springData-jpa-demo\build\classes\com\curiousby\action\UserController.class
目录 0 2016-01-28 13:29 springData-jpa-demo\build\classes\com\curiousby\entity\
文件 1763 2016-01-28 18:08 springData-jpa-demo\build\classes\com\curiousby\entity\User.class
目录 0 2016-01-28 16:53 springData-jpa-demo\build\classes\com\curiousby\repository\
文件 703 2016-01-28 16:58 springData-jpa-demo\build\classes\com\curiousby\repository\UserRepository.class
目录 0 2016-01-28 13:14 springData-jpa-demo\build\classes\com\curiousby\service\
文件 1704 2016-01-28 17:16 springData-jpa-demo\build\classes\com\curiousby\service\UserService.class
目录 0 2016-01-28 13:03 springData-jpa-demo\build\classes\com\curiousby\util\
文件 1008 2016-01-28 17:47 springData-jpa-demo\build\classes\log4j.properties
目录 0 2016-01-28 16:53 springData-jpa-demo\config\
目录 0 2016-01-28 17:41 springData-jpa-demo\src\
文件 3288 2016-01-28 16:42 springData-jpa-demo\src\applicationContext.xm
目录 0 2016-01-28 13:02 springData-jpa-demo\src\com\
目录 0 2016-01-28 16:53 springData-jpa-demo\src\com\curiousby\
目录 0 2016-01-28 13:16 springData-jpa-demo\src\com\curiousby\action\
文件 3146 2016-01-28 17:09 springData-jpa-demo\src\com\curiousby\action\UserController.java
............此处省略64个文件信息
- 上一篇:自用的海思2108砖头复活刷机包
- 下一篇:Django框架完整版.doc
相关资源
- ActionMode的demo源代码
- cocos2d-x半即时战斗rpg游戏demo源码
- 安卓和客户端http通信demo
- 金山云直播Demo
- G729最新源码
- MediaCodec 投屏demo
- crosswalk和webview使用对比Demo
- 自写环信demo
- SpringBoot前后端分离demo后台工程+前台
- 虹软人脸识别 SDK+Demo
- 研华运动控制卡labview demo程序
- opencv人脸识别demo并保存头像小照片
- Delphi XE6官方Demo,Part 2
- STM32L476RC平台的关于SDMMC+fatfs的demo工程
- AD7616资源.7z
- IOS新闻demo
- List Control动态修改编辑Demo
- 讯飞在线语音合成Demo
- QQ聊天室 包括私聊功能
- 坦克大战,unity
- RedisCacheDemo
- 海康布防警报demo
- devexpress第三方控件库demo使用
- SSM框架demospringMVC+spring+mybatis
- 海康摄像头web控件开发demo
- GreenDaoDemo_v3.2.2_Winter
- cmake2.8版本(含windows和linux安装包以及
- Windows下用SSL实现加密通讯Demo
-
xm
l+XSL/FO生成PDF文件Demo - Cxf 和wss4j实现ws-security的demo
评论
共有 条评论