为oracle12c的JDBC的连接配置


# <!--指定连接数据库用的驱动 ojdbc6.jar-->
database.driver=oracle.jdbc.driver.OracleDriver
# <!--指定连接数据库的路径-->
# for oracle 11g
database.url= jdbc:oracle:thin:@localhost:1521:orcl
# for oracle 12c1
database.url= jdbc:oracle:thin:@//127.0.0.1:1522/pdborcl
#<!--指定连接数据库的用户名-->
database.username=test
# <!--指定连接数据库的密码-->
database.password=test
<!--指定数据库使用的SQL-->
hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
#org.hibernate.dialect.OracleDialect
#Oracle10gDialect
# <!--当show_sql属性为true时表示在程序运行时在控制台输出SQL语句,默认为false-->
hibernate.show_sql=false

oracle.maxConnection=100
oracle.expireTime=2400000
oracle.updateTime=600000

参考:
-- 1. h t t p s:// forums.oracle.com/thread/2566804

Connection conn = DriverManager.getConnection
("jdbc:oracle:thin:@//localhost:1521/v112", "scott", "tiger");
// @//machineName:port/SID, userid, password

See pages 2-8 and 2-9 of the JDBC Dev Guide for examples
http ://docs.oracle.com/cd/E16655_01/java.121/e17657.pdf

-- 2. h t t p://joinxin.blogspot.ca/2013/08/connecting-to-12c-database-instance.html
h t t p s : / / b l o g s .oracle.com/oracle_maps_blog/entry/connecting_to_a_12c_database