博客
关于我
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 命令接口_实现“[命令][操作][参数]”样式的命令行接口?
查看>>
Python 和 OpenCV.如何检测图像中的所有(填充)圆形/圆形对象?
查看>>
Python 和 RabbitMQ - 聆听来自多个渠道的消费事件的最佳方式?
查看>>
python编辑器打不开_关于命令ride.py打不开RF,而是打开pycharm编辑器问题解决思路...
查看>>
python编译exe同时支持32位_第三周:同时管理64位和32位版本的Python,并用Pyinstaller打包成exe...
查看>>
Python 和Java 哪个更适合做自动化测试?
查看>>
Python编程:掌握高级语言程序设计。从零基础到精通,收藏这篇就够了!
查看>>
python 图片转ico
查看>>
python 图片转文字、语音转文字、文字转语音保存音频并朗读
查看>>
python 在包含类似字符\x16、\x12、\x某某的数组中将以\x开头的字符找出来的方法
查看>>
Python 在并行进程之间共享字典
查看>>
Python 垃圾收集器文档
查看>>
python 基于 wordcloud + jieba + matplotlib 生成词云
查看>>
python 基于detectron或mask_rcnn的mask遮罩区域进行图片截取
查看>>
Python编程:Tkinter图形界面设计(2)
查看>>
Python 基础 - Day 5 Learning Note - 模块 之 标准库:time (1)
查看>>
Python 基础一
查看>>
python 基础操作知识整理总结
查看>>
Python 基础知识点整理与分享,期盼你的交流!
查看>>
python 基础第七篇
查看>>