开发者社区 问答 正文

hibernate 自动建表为什么没反应?

<bean id="sessionFactory"
        class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
        <property name="dataSource">
            <ref bean="dataSource" />
        </property>
        <property name="annotatedClasses">
            <list>        
             <value>pojo.test</value>
            </list>
        </property>
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                <prop key="hibernate.show_sql">true</prop>
                <prop key="hibernate.dynamic-update">true</prop>
                <prop key="hibernate.hbm2ddl.auto">update</prop> 
                </props>
        </property>
    </bean>

为什么没反应? 求解!

展开
收起
爵霸 2016-03-04 09:31:29 2078 分享 版权
1 条回答
写回答
取消 提交回答
  • hibernate4不支持hibernateTemplate

    2019-07-17 18:51:48
    赞同 展开评论