hibernate 配置属性
?Hibernate JDBC 属性
?
属性名用途hibernate.connection.driver_classJDBC driver classhibernate.connection.urlJDBC URLhibernate.connection.usernamedatabase userhibernate.connection.password数据库用户密码hibernate.connection.pool_sizemaximum number of pooled connections?
Hibernate 可选配置属性
有大量属性能用来控制 Hibernate 在运行期的行为。它们都是可选的,并拥有适当的默认值。
?
属性名用途hibernate.dialect允许 Hibernate 针对特定的关系数据库生成优化的 SQL 的org.hibernate.dialect.Dialect 的类名。 例如:full.classname.of.Dialect
在大多数情况下,Hibernate 可以根据 JDBC 驱动返回的 JDBC metadata 选择正确的 org.hibernate.dialect.Dialect 实现。
org.hibernate.SQL 这个 log category设为 debug。例如:true | false
例如:true | false
例如:SCHEMA_NAME
例如:CATALOG_NAME
org.hibernate.SessionFactory 创建后,将自动使用这个名字绑定到 JNDI 中。例如:jndi/composite/name
0 意味着将关闭默认的外连接抓取。例如: 建议在 0 到 3 之间取值
例如:建议的取值为 4,8,和 16
SessionFactory 打开的所有 Session 指定默认的实体表现模式。取值dynamic-map,dom4j,pojo
例如:true | false
例如:true | false
例如:true | false
false。例如:true | false
@GeneratedValue. It indicates whether or not the new IdentifierGenerator implementations are used for javax.persistence.GenerationType.AUTO, javax.persistence.GenerationType.TABLE and javax.persistence.GenerationType.SEQUENCE. Default to false to keep backward compatibility.例如:true | false
文档路径
http://docs.jboss.org/hibernate/core/3.6/reference/zh-CN/html/session-configuration.html#configuration-optional