首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

Spring整合hibernate自动创建表的有关问题

2012-08-28 
Spring整合hibernate自动创建表的问题Spring整合hibernate自动创建表,配置如下:property namehibernate

Spring整合hibernate自动创建表的问题
Spring整合hibernate自动创建表,配置如下:
<property name="hibernateProperties">
<props>
<prop key="hibernate.connection.autocommit">true</prop>
<prop key="hibernate.dialect">
org.hibernate.dialect.MySQLDialect
</prop>
<prop key="connection.charactorEncoding">true</prop>
<prop key="show_sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">create</prop>
</props>
</property>

很奇怪,没有自动创建表,也不报错,只是在数据入库的时候,报表不存在。
我在网上找了老半天,还是没有解决问题。
我使用的是注解方式。

[解决办法]
为啥没看到这个配置?

 <property name="hbm2ddl.auto">update</property>
[解决办法]

探讨

为啥没看到这个配置?

<property name="hbm2ddl.auto">update</property>

热点排行