20.1.3. 属性(Properties)

可以通过如下方式指定数据库属性:

  • 通过-D系统参数

  • hibernate.properties文件中

  • 位于一个其它名字的properties文件中,然后用 —properties参数指定

所需的参数包括:

表 20.3. SchemaExport 连接属性

属性名说明
hibernate.connection.driver_classjdbc driver class
hibernate.connection.urljdbc url
hibernate.connection.usernamedatabase user
hibernate.connection.passworduser password
hibernate.dialect方言(dialect)