springmvc的hibernate的配置操作
来源:互联网 发布:php 源代码 保护 编辑:程序博客网 时间:2024/06/03 23:41
#hibernate配置
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl.auto=update
hibernate.show_sql=false
hibernate.format_sql=true
hibernate.use_sql_comments=true
validationQuery=SELECT 1
<!-- 配置hibernate session工厂 -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.use_sql_comments">${hibernate.use_sql_comments}</prop>
</props>
</property>
<!-- 自动扫描注解方式配置的hibernate类文件 -->
<property name="packagesToScan">
<list>
<value>cn.inovance.iotas.common.domain</value>
<value>cn.inovance.iotas.business.entity</value>
<value>cn.inovance.iotas.common.upkeep.entity</value>
</list>
</property>
<!-- 自动扫描hbm方式配置的hibernate文件和.hbm文件 -->
<!-- <property name="mappingDirectoryLocations"> <list> <value>classpath:sy/hbm</value> </list> </property> -->
</bean>
hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
hibernate.hbm2ddl.auto=update
hibernate.show_sql=false
hibernate.format_sql=true
hibernate.use_sql_comments=true
validationQuery=SELECT 1
<!-- 配置hibernate session工厂 -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="hibernateProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.use_sql_comments">${hibernate.use_sql_comments}</prop>
</props>
</property>
<!-- 自动扫描注解方式配置的hibernate类文件 -->
<property name="packagesToScan">
<list>
<value>cn.inovance.iotas.common.domain</value>
<value>cn.inovance.iotas.business.entity</value>
<value>cn.inovance.iotas.common.upkeep.entity</value>
</list>
</property>
<!-- 自动扫描hbm方式配置的hibernate文件和.hbm文件 -->
<!-- <property name="mappingDirectoryLocations"> <list> <value>classpath:sy/hbm</value> </list> </property> -->
</bean>
阅读全文
0 0
- springmvc的hibernate的配置操作
- springMVC+Hibernate的配置
- springMVC+Hibernate的配置
- SpringMVC与Hibernate的集成配置详解
- 集成springmvc spring hibernate的配置过程
- SpringMVC集成Hibernate的主要配置
- SpringMVC集成Hibernate的主要配置
- SpringMVC集成Hibernate的主要配置
- Hibernate的配置以及操作
- springmvc里面的mogoDB的配置操作
- springmvc的redis的配置操作
- springMVC对ibatis,hibernate,aop,缓存等的配置
- Hibernate的持久化配置和操作
- Hibernate的配置及保存操作
- hibernate-hibernate的配置
- Springmvc 的一些操作
- SpringMVC 的上传操作
- SpringMVC配置文件applicationContext.xml操作数据源的配置
- codeforcodeforces 808D——Array Division(查找,set)
- 【数据结构】快速排序(QuickSortNonR)的非递归实现
- springmvc的redis的配置操作
- CentOS7 安装Nginx
- 素数平方和(类)
- springmvc的hibernate的配置操作
- 位置和传感器:传感器概览
- bzoj 3295 [Cqoi2011]动态逆序对
- spring.xml配置文件包含其他文件格式
- WebService入门及jdk调用
- C++实验题---填空(求几何图型面积)
- tf.assign的用法
- spring-mvc.xml的配置与解析
- Spring.xml配置文件参数传递