<hibernate-configuration> <session-factory> <!-- 关于连接数据库的username和url --> <property name="connection.username">hibernate</property> <property name="connection.url"> jdbc:mysql://localhost:3306/testdb </property> <!-- 采用的数据库方言 --> <property name="dialect"> org.hibernate.dialect.MySQLDialect </property> <!-- DB Driver's 名字 --> <property name="myeclipse.connection.profile"> mysqldriver </property> <!-- 数据库连接的密码及驱动类 --> <property name="connection.password">123456</property> <property name="connection.driver_class"> com.mysql.jdbc.Driver </property> <!-- 执行过程中显示hibernate的sql语句 --> <property name="show_sql">true</property> <!-- Specify location of Hibernate mapping files --> <mapping resource="cn/xhu/wy/hibernate/demo01/Person.hbm.xml" /> </session-factory> </hibernate-configuration>
hibernate.config.xml配置解析
最新推荐文章于 2021-06-26 21:34:54 发布