日期:2014-05-17  浏览次数:20608 次

各位请教下什么我的这个ssh一直提示连接的是sqlServer而不是mysql
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
           
<!-- 定义数据源 -->           
    <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName">
<value>com.mysql.jdbc.Driver</value>
</property>
<property name="url">
<value>jdbc:mysql://127.0.0.1/MyBlog</value>
</property>
<property name="username">
<value>root</value>
</property>
<property name="password">
<value>5252</value>
</property>
</bean>

<!-- 定义SessionFactory -->       
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="hibernate.show_sql">false</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>org/lxh/blog/model/User.hbm.xml</value>
<value>org/lxh/blog/model/Article.hbm.xml</value>
<value>org/lxh/blog/model/BlogInfo.hbm.xml</value>
<value>org/lxh/blog/model/Critique.hbm.xml</value>
<value>org/lxh/blog/model/Dianjiliang.hbm.xml</value>
</list>
</property>
</bean>

<!-- 定义hibernateTemplate -->
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>
</bean>
ssh mysql java