
hibernate正向生成数据库表以及配置——hibernate.cfg.xml
发布日期:2021-05-14 13:05:44
浏览次数:8
分类:精选文章
本文共 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.
发表评论
最新留言
哈哈,博客排版真的漂亮呢~
[***.90.31.176]2025年05月02日 12时47分21秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
block多队列分析 - 2. block多队列的初始化
2021-05-12
Java时间
2021-05-12
不编译只打包system或者vendor image命令
2021-05-12
MySQL
2021-05-12
The wxWindows Library Licence (WXwindows)
2021-05-12
leetcode——第203题——虚拟头结点
2021-05-12
【编程】C语言入门:1到 100 的所有整数中出现多少个数字9
2021-05-12
MySQL----基础及常用命令
2021-05-12
模拟集成:MOS管的工作区小误区(简单版)
2021-05-12
flink启动(二)
2021-05-12
前端开发进阶手册.pdf
2021-05-12
软件架构设计和MESH经验之谈
2021-05-12
redis持久化分析
2021-05-12
复杂指针解析
2021-05-12
打开word时424错误
2021-05-12
如何添加开机自启项
2021-05-12
❤️一个18k运维项目经验这样做的,offer到碗里来❤️
2021-05-12
关于宝塔面板安装的mysql用Navicat连接出现2003的错误解决
2021-05-12
Windows2016 FTP用户隔离
2021-05-12
js传入参数是中文的时候出现 “******”未定义错误
2021-05-12