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

c3p0配置中遇到的一个及其郁闷的有关问题

2012-09-12 
c3p0配置中遇到的一个及其郁闷的问题s2sh使用的是mysql一直报错,applicationContext是从网上copy来的如下:

c3p0配置中遇到的一个及其郁闷的问题

s2sh使用的是mysql一直报错,applicationContext是从网上copy来的如下:

?

<?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:tx="http://www.springframework.org/schema/tx"
?xmlns:context="http://www.springframework.org/schema/context"
?xsi:schemaLocation="
??http://www.springframework.org/schema/beans
??http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
??http://www.springframework.org/schema/tx
??http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
??http://www.springframework.org/schema/aop
??http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
??http://www.springframework.org/schema/context
??http://www.springframework.org/schema/context/spring-context-3.0.xsd">

?<!-- 扫描注释 -->
?<context:component-scan base-package="cd.xf"></context:component-scan>

?<!-- 数据源 -->
?<bean id="dataSource"
??/>
??</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">false</prop>
????<prop key="hibernate.connection.release_mode">
?????auto
????</prop>
????<prop key="hibernate.autoReconnect">true</prop>
???</props>
??</property>
?</bean>

?<!--?
??<bean id="sessionFactory"
??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:tx="http://www.springframework.org/schema/tx"
?xmlns:context="http://www.springframework.org/schema/context"
?xsi:schemaLocation="
??http://www.springframework.org/schema/beans
??http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
??http://www.springframework.org/schema/tx
??http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
??http://www.springframework.org/schema/aop
??http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
??http://www.springframework.org/schema/context
??http://www.springframework.org/schema/context/spring-context-3.0.xsd">

?<!-- 扫描注释 -->
?<context:component-scan base-package="cd.xf"></context:component-scan>

?<!-- 数据源 -->
?<bean id="dataSource"
??/>
??</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">false</prop>
????<prop key="hibernate.connection.release_mode">
?????auto
????</prop>
????<prop key="hibernate.autoReconnect">true</prop>
???</props>
??</property>
?</bean>

?<!--?
??<bean id="sessionFactory"
??class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
??<property name="configLocation"
??value="classpath:hibernate.cfg.xml">
??</property>
??</bean>
?-->

</beans>

?

写好后看到文件有点凌乱,format了一下,结果干了多余的事……哎!

热点排行