这是posgresql的hibernate.cfg.xml,它将帮助您使用posgresql的基本hibernate配置。
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><hibernate-configuration> <session-factory> <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property> <property name="hibernate.connection.driver_class">org.postgresql.Driver</property> <property name="hibernate.connection.username">postgres</property> <property name="hibernate.connection.password">password</property> <property name="hibernate.connection.url">jdbc:postgresql://localhost:5432/hibernatedb</property> <property name="connection_pool_size">1</property> <property name="hbm2ddl.auto">create</property> <property name="show_sql">true</property> <mapping /> </session-factory></hibernate-configuration>



