以sqlserver2005为例:
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
<property name="driverClass" value="com.microsoft.sqlserver.jdbc.SQLServerDriver"></property>
<property name="jdbcUrl" value="jdbc:sqlserver://192.168.26.4:1433;DatabaseName=NetDB_HasData"></property>
<property name="user"><value>***</value></property>
<property name="password"><value>***</value></property>
</bean>
<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.SQLServerDialect
<!-- org.hibernate.dialect.MySQLDialect-->
</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<property name="mappingResources">
<list>
<value>com/nuctech/hibernate/UserInfo.xml</value>
<value>com/nuctech/hibernate/Security.xml</value>
</list>
</property>
</bean>
简单的几句话就OK了