package cn.bdx.controller;
import javax.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import cn.bdx.model.User;
import cn.bdx.service.intf.UserService;
@Controller
@RequestMapping("/user")
public class UserController {
@Resource
private UserService userService;
@RequestMapping("/add")
public ModelAndView add(User user,ModelMap model) {
this.userService.add(user);
System.out.println("add user complete");
return new ModelAndView("index",model);
}
@RequestMapping("/query")
public ModelAndView query(ModelMap model) {
this.userService.query();
System.out.println("query user compelte");
return new ModelAndView("index",model);
}
public UserService getUserService() {
return userService;
}
public void setUserService(UserService userService) {
this.userService = userService;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
springmvc+spring+hibernate整合(注解)
共57个文件
jar:30个
class:6个
java:6个
需积分: 10 20 下载量 159 浏览量
2016-05-20
14:14:14
上传
评论 1
收藏 13.55MB 7Z 举报
温馨提示
springmvc+spring+hibernate整合(注解),测试环境myeclipse2014+jdk1.6。简单测试这三个框架的整合,并含有简单的添加查询
资源推荐
资源详情
资源评论
收起资源包目录
spring-hibernate-test.7z (57个子文件)
spring-hibernate-test
.settings
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.xml 414B
org.eclipse.wst.common.component 522B
org.eclipse.wst.jsdt.ui.superType.container 49B
.jsdtscope 522B
org.eclipse.jdt.core.prefs 364B
src
jdbc.properties 192B
cn
bdx
dao
intf
UserDao.java 178B
impl
UserDaoImpl.java 998B
model
User.java 686B
controller
UserController.java 1KB
service
intf
UserService.java 189B
impl
UserServiceImpl.java 792B
applicationContext.xml 3KB
.project 1KB
WebRoot
META-INF
MANIFEST.MF 39B
WEB-INF
web.xml 1KB
classes
jdbc.properties 192B
cn
bdx
dao
intf
UserDao.class 249B
impl
UserDaoImpl.class 2KB
model
User.class 1KB
controller
UserController.class 2KB
service
intf
UserService.class 261B
impl
UserServiceImpl.class 1KB
applicationContext.xml 3KB
lib
hibernate-jpa-2.1-api-1.0.0.Final.jar 111KB
mysql-connector-java-3.1.13-bin.jar 446KB
dom4j-1.6.1.jar 307KB
spring-beans-4.1.6.RELEASE.jar 692KB
hibernate-core-4.3.8.Final.jar 5.03MB
spring-tx-4.1.6.RELEASE.jar 247KB
aopalliance-1.0.jar 4KB
antlr-2.7.7.jar 435KB
spring-expression-4.1.6.RELEASE.jar 253KB
spring-context-4.1.6.RELEASE.jar 1002KB
spring-aspects-4.1.6.RELEASE.jar 55KB
spring-jdbc-4.1.6.RELEASE.jar 417KB
jboss-logging-annotations-1.2.0.Beta1.jar 11KB
jandex-1.1.0.Final.jar 75KB
commons-dbcp-1.2.1.jar 105KB
spring-web-4.1.6.RELEASE.jar 702KB
jboss-logging-3.1.3.GA.jar 56KB
javassist-3.18.1-GA.jar 697KB
aspectjweaver.jar 1.8MB
commons-logging-1.1.3.jar 61KB
cglib-nodep-2.1_3.jar 317KB
hibernate-commons-annotations-4.0.5.Final.jar 74KB
commons-pool.jar 61KB
spring-orm-4.1.6.RELEASE.jar 367KB
slf4j-api-1.5.8.jar 23KB
spring-aop-4.1.6.RELEASE.jar 351KB
jboss-transaction-api_1.2_spec-1.0.0.Final.jar 27KB
spring-core-4.1.6.RELEASE.jar 984KB
slf4j-log4j12-1.5.8.jar 9KB
spring-webmvc-4.1.6.RELEASE.jar 762KB
index.jsp 829B
.classpath 1KB
共 57 条
- 1
资源评论
MjCreator
- 粉丝: 4
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功