首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

Spring 组合 Hibernate 配置 C3P0

2012-08-21 
Spring 结合 Hibernate 配置 C3P0?首先要把jar包加入,不然会提示找不到class,官方只给了源文件,还要编译,

Spring 结合 Hibernate 配置 C3P0

?

首先要把jar包加入,不然会提示找不到class,官方只给了源文件,还要编译,这有一个编译好的

?

?http://669341085.iteye.com/admin/blogs/856216

之后再applicationContext.xml 文件中加入:

?

以下转自:

http://gznofeng.iteye.com/blog/200968

?

本文出自 “maomao” 博客,请务必保留此出处http://maomao.blog.51cto.com/115985/20460

本文出自 51CTO.COM技术博客

?

applicationContext.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:jee="http://www.springframework.org/schema/jee"    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd            http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.0.xsd">    <bean id="dataSource"        />        </property>        <property name="mappingResources">            <list>                <value>com/xh/hibernate/vo/User.hbm.xml</value>            </list>        </property>        <property name="hibernateProperties">            <props>                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>                <prop key="hibernate.show_sql">true</prop>                <prop key="hibernate.generate_statistics">true</prop>                <prop key="hibernate.connection.release_mode">auto</prop>                <prop key="hibernate.autoReconnect">true</prop>            </props>        </property>    </bean></beans>

?

热点排行