码迷,mamicode.com
首页 > 数据库 > 详细

Hibernate连接数据库配置参数

时间:2016-08-24 18:55:58      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:

Mysql

hibernate.dialect = org.hibernate.dialect.MySQLDialect
connection.driver_class = com.mysql.jdbc.Driver
connection.url = jdbc:mysql://localhost:3306/test
connection.username = 用户名
connection.password = 密码

Mysql解决乱码:url后加参数:jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=UTF-8

 

Oracle 11g

hibernate.dialect = org.hibernate.dialect.OracleDialect
hibernate.connection.driver_class = oracle.jdbc.OracleDriver
hibernate.connection.username = 用户名
hibernate.connection.password = 密码
hibernate.connection.url = jdbc:oracle:thin:@localhost:1521:orcl

Hibernate连接数据库配置参数

标签:

原文地址:http://www.cnblogs.com/dicksoy/p/5804072.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!