springMVC3+spring3.2+hibernate3.2集成applicatinContext.xml文件的配置
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:cache="http://www.springframework.org/schema/cache"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.2.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd">
<!--配置数据源,有多重数据源可选择,这里我们选择c3p0提供的数据源-->
<bean id="dataSource" class="">
<!--加载数据库连接信息-->
<property name="driverClass" value=""></property>
<property name="jdbcUrl" value=""></property>
<property name="user" value=""></property>
<property name="password" value=""></property>
</bean>
<!--加载基于配置文件的sessionFactory-->
<!-- <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> -->
<!--加载基于注解的sessionFactory-->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<bean>
<!--注入数据源-->
<property name="dataSource" ref="dataSource"></property>
<!--配置hibernate的属性设置-->
<property name="hibernateProperties">
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="show_sql">true</prop>
<prop key="format_sql">true</prop>
</property>
<!--使用配置文件时,加载hbm映射文件-->
<!--<property name="mappingResource">
<list>
<value>com.*</value>
</list>
</property>-->
<!-- 使用annotation时,加载hibernate的注解类 -->
<property name="packagesToScan">
<list>
<value>com.hpe.bean</value>
</list>
</property>
</bean>
<!--hibernate使用配置文件时,使用控制反转注入bean-->
<bean id="" class=""></bean>
<beans>
没有合适的资源?快使用搜索试试~ 我知道了~
spring+springMVC+hibernate集成
共44个文件
jar:41个
xml:3个
需积分: 10 21 下载量 173 浏览量
2016-11-13
21:45:03
上传
评论
收藏 12.52MB ZIP 举报
温馨提示
spring+springMVC+hibernate集成,包括配置文件applicationContext.xml、web.xml、springMVC-servlet.xml
资源推荐
资源详情
资源评论
收起资源包目录
spring+springMVC+hibernate集成.zip (44个子文件)
spring+springMVC+hibernate集成
springMVC-servlet文件配置.xml 2KB
web.xm文件的配置.xml 2KB
applicationContext文件的配置.xml 3KB
所需jar包
spring-beans-3.2.2.RELEASE.jar 593KB
spring-build-src-3.2.2.RELEASE.jar 71KB
spring-instrument-tomcat-3.2.2.RELEASE.jar 10KB
spring-jms-3.2.2.RELEASE.jar 200KB
spring-web-3.2.2.RELEASE.jar 612KB
spring-core-3.2.2.RELEASE.jar 846KB
c3p0-0.9.1.jar 594KB
aopalliance.jar 4KB
hibernate-annotations.jar 273KB
spring-jdbc-3.2.2.RELEASE.jar 396KB
commons-collections-3.2.2.jar 575KB
commons-pool-1.6.jar 109KB
jta.jar 9KB
spring-oxm-3.2.2.RELEASE.jar 72KB
hibernate3.jar 2.11MB
spring-webmvc-portlet-3.2.2.RELEASE.jar 184KB
spring-webmvc-3.2.2.RELEASE.jar 621KB
mysql-connector-java-5.0.8.jar 528KB
jstl.jar 20KB
ehcache-1.2.3.jar 203KB
spring-test-3.2.2.RELEASE.jar 445KB
spring-instrument-3.2.2.RELEASE.jar 7KB
spring-aop-3.2.2.RELEASE.jar 328KB
commons-dbcp-1.2.1.jar 105KB
spring-tx-3.2.2.RELEASE.jar 236KB
ejb3-persistence.jar 49KB
spring-context-support-3.2.2.RELEASE.jar 125KB
spring-struts-3.2.2.RELEASE.jar 35KB
hibernate-commons-annotations-3.3.0.ga.jar 65KB
spring-aspects-3.2.2.RELEASE.jar 50KB
dom4j-1.6.1.jar 307KB
spring-expression-3.2.2.RELEASE.jar 191KB
asm.jar 26KB
spring-context-3.2.2.RELEASE.jar 842KB
aspectjweaver-1.5.0.jar 1.67MB
slf4j-api-1.7.21.jar 40KB
commons-logging-1.1.1.jar 59KB
spring-orm-3.2.2.RELEASE.jar 378KB
cglib-2.1.3.jar 276KB
antlr-2.7.6.jar 433KB
standard.jar 384KB
共 44 条
- 1
资源评论
加载中。。。AA
- 粉丝: 2
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功