博客
关于我
hibernate正向生成数据库表以及配置——hibernate.cfg.xml
阅读量:583 次
发布时间: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/

你可能感兴趣的文章
Python exe文件打包神器-Nuitka!
查看>>
python file
查看>>
Python FileDialog获取文件夹路径不是文件
查看>>
python filter过滤器的使用_python基础知识分享:zip()、filter函数和reduce如何使用?...
查看>>
python flask 请求code 400, message Bad request version
查看>>
Python Flink Stateful函数入口上的Kafka键访问
查看>>
Python float - str - 浮动怪异
查看>>
Python Flower库:分布式任务管理与监控
查看>>
Python for 循环和迭代器行为
查看>>
Python For循环多次返回
查看>>
python frame_python3 selenium自动化 frame表单嵌套的切换方法
查看>>
Python ftplib - 指定端口
查看>>
Python furl库:一键搞定复杂URL操作
查看>>
Python GC 也会关闭文件吗?
查看>>
python gen_key.py 报错 提示找不到OpenSSL lib
查看>>
python getattrribute_Python学习——面向对象高级之反射
查看>>
Python进阶语法:字典推导式
查看>>
python gil_Python中GIL的使用详解
查看>>
python glob.glob使用
查看>>
python glob的安装和使用
查看>>