Hibernate4日志配置与会话工厂详解.pdfVIP

  • 0
  • 0
  • 约6.14千字
  • 约 6页
  • 2026-03-20 发布于北京
  • 举报

Hibernate4日志

1、确定要使用的日志实现log4j

2、Slf4japi.jar和log4j的jar包放入classpath,(slf4j‑log4j.jar)

3、编写log4j.properties

4、hibernate.cfg.xml讲解

会话工厂

!--配置数据库连接信息--

!‑‑Databasedriver‑‑

ver_类

属性名称=connection.dri

com.mysql.jdbc.Driver

/属性

!‑‑url相当于:jdbc:mysql://localhost:3306/hibernate4‑‑

属性名称=connection.url

jdbc:mysql:///hibernate4

/属性

属性名称=connection.usernameroot/属性

属性

文档评论(0)

1亿VIP精品文档

相关文档