我找不到 hibernate.cfg.xml 文件有什么问题。
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd" >
<hibernate-configuration>
<session-factory>
- <!-- Database connection settings
-->
<property name="connection.driver_class">org.h2.Driver</property>
<property name="connection.url">jdbc:h2://localhost:1527/hibernatedb</property>
<property name="connection.username">h2</property>
<property name="connection.password" />
- <!-- JDBC connection pool (use the built-in)
-->
<property name="connection.pool_size">1</property>
- <!-- Disable the second-level cache
-->
<property name="cache.provider_class">org.hibernate.cache.internal.CollectionCacheInvalidator
</property>
- <!-- Echo all executed SQL to stdout
-->
<property name="show_sql">true</property>
- <!-- Drop and re-create the database schema on startup
-->
<property name="hbm2ddl.auto">create</property>
- <!-- …Run Code Online (Sandbox Code Playgroud)