Hibernate JDBC 属性
| 属性名 | 用途 |
|---|---|
| hibernate.connection.driver_class | JDBC driver class |
| hibernate.connection.url | JDBC URL |
| hibernate.connection.username | database user |
| hibernate.connection.password | 数据库用户密码 |
| hibernate.connection.pool_size | maximum 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
文档路径
本文详细介绍了Hibernate中JDBC属性的用途,包括连接配置、可选配置等,并提供了具体示例,帮助开发者更好地理解并应用这些配置。
1137

被折叠的 条评论
为什么被折叠?



