package com.controller;
import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.dao.IUserDAO;
import com.pojo.User;
import com.service.IHelloService;
@Controller
public class HelloController {
@Resource(name="helloService")
private IHelloService helloService;
@SuppressWarnings("unchecked")
@RequestMapping(value="/saveAndSearch.do")
public ModelAndView search(){
ModelAndView view = new ModelAndView("list");
User user = new User();
user.setName("Pandy");
user.setPassword("password");
helloService.insertUser(user);
List<User> list = helloService.selectUser();
System.out.println("list.size()="+list.size());
view.addObject("message","Search Successful! counter="+list.size());
return view;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
Spring MVC3和Hibernate3整合的源码
共80个文件
jar:49个
java:6个
class:6个
5星 · 超过95%的资源 需积分: 10 59 下载量 36 浏览量
2011-11-02
20:14:20
上传
评论 2
收藏 12.86MB RAR 举报
温馨提示
昨天上传的不怎么好,今天上传的,是使用更多的注解,简化更多的配置文件,增加了service层。
资源推荐
资源详情
资源评论
收起资源包目录
mySpringMVCHibernate.rar (80个子文件)
mySpringMVCHibernate
.project 2KB
.springBeans 415B
.mymetadata 333B
src
com
service
IHelloService.java 188B
impl
HelloService.java 868B
pojo
User.java 891B
controller
HelloController.java 1018B
dao
IUserDAO.java 195B
impl
UserDAO.java 967B
WebRoot
WEB-INF
spring-form.tld 69KB
applicationContext.xml 2KB
spring.tld 17KB
classes
com
service
IHelloService.class 261B
impl
HelloService.class 1KB
pojo
User.class 1KB
controller
HelloController.class 2KB
dao
impl
UserDAO.class 1KB
IUserDAO.class 247B
lib
org.springframework.beans-3.0.5.RELEASE.jar 542KB
hibernate-commons-annotations.jar 65KB
javassist-3.9.0.GA.jar 583KB
cglib-2.2.jar 272KB
org.springframework.expression-3.0.5.RELEASE.jar 166KB
jotm.jar 121KB
dom4j-1.6.1.jar 307KB
org.springframework.aspects-3.0.5.RELEASE.jar 35KB
com.springsource.org.apache.commons.pool-1.5.3.jar 95KB
log4j-1.2.14.jar 359KB
org.springframework.web.struts-3.0.5.RELEASE.jar 31KB
persistence.jar 69KB
com.springsource.org.apache.commons.httpclient-3.1.0.jar 301KB
org.springframework.asm-3.0.5.RELEASE.jar 52KB
org.springframework.transaction-3.0.5.RELEASE.jar 226KB
org.springframework.aop-3.0.5.RELEASE.jar 314KB
com.springsource.org.codehaus.jackson.mapper-1.0.0.jar 264KB
slf4j-log4j12-1.5.8.jar 9KB
com.springsource.org.apache.commons.lang-2.4.0.jar 258KB
org.springframework.instrument.tomcat-3.0.5.RELEASE.jar 6KB
commons-dbcp.jar 119KB
antlr-2.7.6.jar 433KB
commons-collections-3.1.jar 546KB
org.springframework.instrument-3.0.5.RELEASE.jar 2KB
org.springframework.oxm-3.0.5.RELEASE.jar 60KB
org.springframework.web.portlet-3.0.5.RELEASE.jar 171KB
xapool.jar 90KB
mysql-connector-java-5.0.8-bin.jar 528KB
com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar 603KB
org.springframework.web.servlet-3.0.5.RELEASE.jar 409KB
ehcache-1.2.3.jar 203KB
slf4j-api-1.5.8.jar 23KB
org.springframework.orm-3.0.5.RELEASE.jar 326KB
hibernate3.jar 2.31MB
org.springframework.web-3.0.5.RELEASE.jar 386KB
ejb3-persistence.jar 49KB
com.springsource.org.aopalliance-1.0.0.jar 5KB
com.springsource.org.apache.commons.fileupload-1.2.0.jar 53KB
com.springsource.net.sf.cglib-2.2.0.jar 319KB
hibernate-annotations.jar 273KB
org.springframework.context-3.0.5.RELEASE.jar 653KB
org.springframework.core-3.0.5.RELEASE.jar 373KB
hibernate-entitymanager.jar 116KB
jta-1.1.jar 13KB
org.springframework.jdbc-3.0.5.RELEASE.jar 377KB
com.springsource.org.apache.commons.logging-1.1.1.jar 60KB
com.springsource.org.apache.log4j-1.2.15.jar 387KB
hibernate-validator.jar 61KB
com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar 1.57MB
springhibernate-servlet.xml 1KB
web.xml 1KB
pages
list.jsp 812B
index.jsp 829B
META-INF
MANIFEST.MF 36B
.myeclipse
.myhibernatedata 554B
.settings
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.common.project.facet.core.xml 252B
org.eclipse.jdt.core.prefs 395B
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.component 498B
.jsdtscope 493B
.classpath 5KB
共 80 条
- 1
不净之心
- 粉丝: 49
- 资源: 49
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页