Java 调试时无法看到H2数据库表得到更新
我正在使用h2数据库来测试我的实体关系。我正在使用Hibernate作为Spring框架上的ORM。下面是测试xml:Java 调试时无法看到H2数据库表得到更新,java,spring,hibernate,h2,Java,Spring,Hibernate,H2,我正在使用h2数据库来测试我的实体关系。我正在使用Hibernate作为Spring框架上的ORM。下面是测试xml: <beans profile="test-h2"> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"
<beans profile="test-h2">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
<property name="driverClassName" value="org.h2.Driver"/>
<property name="url" value="jdbc:h2:target/h2/pps;AUTO_SERVER=TRUE"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</bean>
<bean id="entityManagerFactory" parent="entityManagerFactoryCommonParent">
<property name="jpaProperties">
<props>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
</bean>
更新
真的
我以前可以在我的旧项目中完成它,但在新项目中它不起作用
知道我遗漏了什么吗?在检查应用程序外部之前,你确定要提交交易吗?我不认为我需要这么明确,因为我使用JpaRepository执行CRUD操作。