只需在配置文件ApplicationContext.xml中加入下面代码红色部分。
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
destroy-method="destroy" >
<property name="dataSource" ref="dataSource" />
<property name="mappingResources">
<list>
<value>com/snsoft/crm/domain/SnRukudan.hbm.xml</value>
<value>com/snsoft/crm/domain/SnKehu.hbm.xml</value
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.query.factory_class">
org.hibernate.hql.classic.ClassicQueryTranslatorFactory
</prop>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop>
<prop key="hibernate.show_sql">false</prop>
</props>
</property>
</bean> |
posted on 2009-04-25 11:38
Werther 阅读(1312)
评论(2) 编辑 收藏 所属分类:
10.Java