博客
关于我
hibernate正向生成数据库表以及配置——hibernate.cfg.xml
阅读量:582 次
发布时间:2019-03-11

本文共 1800 字,大约阅读时间需要 6 分钟。

In the provided XML configuration file, we can observe the configuration settings for a Hibernate session factory that leverages an Oracle9Dialect. The key components include:1. **Session Factory Configuration**: The root element defines a session factory, which is essential for managing database connections in Hibernate.2. **Dialect Setting**: The dialect specified here is `org.hibernate.dialect.Oracle9Dialect`, indicating that the application is optimised to interact with an Oracle 9 database environment.3. **Connection Details**: The connection information is provided under the `connection.url` property, set to `jdbc:oracle:thin:@127.0.0.1:1521:orcl`. This URL specifies the Oracle Thin driver, hostname, port number, and database name.4. **Authentication Credentials**: The `connection.username` and `connection.password` fields are set to `student`, suggesting that this application uses a simple `student` account for database authentication.5. **Session Context and Driver Settings**: The `current_session_context_class` property set to `thread` indicates that each session operates within a thread-independent context, which is a standard setup for thread-safe applications.6. **Driver Class**: The `connection.driver_class` is specified as `oracle.jdbc.OracleDriver`, ensuring that the correct native driver is used for Oracle databases.7. **Additional Configuration Properties**: The `myeclipse.connection.profile` is set to `student`, which might be used for profile management within an IDE like MyEclipse. Additionally, `show_sql` and `format_sql` are enabled, which are useful for debugging purposes.8. **Mapping Resources**: The configuration includes mappings for two entities, `Student` and `Teacher`, referencing their respective XML mapping files located at specific paths.

转载地址:http://lzutz.baihongyu.com/

你可能感兴趣的文章
MySQL-数据目录
查看>>
MySQL-数据页的结构
查看>>
MySQL-架构篇
查看>>
MySQL-索引的分类(聚簇索引、二级索引、联合索引)
查看>>
Mysql-触发器及创建触发器失败原因
查看>>
MySQL-连接
查看>>
mysql-递归查询(二)
查看>>
MySQL5.1安装
查看>>
mysql5.5和5.6版本间的坑
查看>>
mysql5.5最简安装教程
查看>>
mysql5.6 TIME,DATETIME,TIMESTAMP
查看>>
mysql5.6.21重置数据库的root密码
查看>>
Mysql5.6主从复制-基于binlog
查看>>
MySQL5.6忘记root密码(win平台)
查看>>
MySQL5.6的Linux安装shell脚本之二进制安装(一)
查看>>
MySQL5.6的zip包安装教程
查看>>
mysql5.7 for windows_MySQL 5.7 for Windows 解压缩版配置安装
查看>>
Webpack 基本环境搭建
查看>>
mysql5.7 安装版 表不能输入汉字解决方案
查看>>
MySQL5.7.18主从复制搭建(一主一从)
查看>>