Java 数据库连接配置

1.Mysql

driver: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/dataBase?useUnicode=true&characterEncoding=utf8&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
username: root
password: root

2.Oracle

SQL.driver=oracle.jdbc.OracleDriver
SQL.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl
SQL.userName=root
SQL.passWord=root

SQL.initialSize=5
SQL.maxActive=20
SQL.maxIdle=5
SQL.minIdle=2
SQL.maxWait=30

3.Sql Server

connection.driver_class=com.microsoft.sqlserver.jdbc.SQLServerDriver
connection.url=jdbc:sqlserver://127.0.0.1;DatabaseName=Foxti_SZZY
connection.username=root
connection.password=root

proxool.statistics=1m,15m,1h,1d
proxool.minimum.connection.count=5
proxool.maximum.connection.count=40
proxool.simultaneous.build.throttle=30

hibernate.dialect=com.foxti.szzy.dialect.SqlServer2008Dialect
#hibernate.show_sql=true
#hibernate.format_sql=true
hibernate.query.substitutions=true 1, false 0
hibernate.default_batch_fetch_size=16
hibernate.max_fetch_depth=2
hibernate.generate_statistics=true
hibernate.bytecode.use_reflection_optimizer=true
hibernate.cache.use_second_level_cache=false
hibernate.cache.use_query_cache=false
hibernate.cache.region.factory_class=org.hibernate.cache.EhCacheRegionFactory
hibernate.cache.use_structured_entries=true
hibernate.current_session_context_class=org.springframework.orm.hibernate4.SpringSessionContext
hibernate.hbm2ddl.auto=update
#hibernate.hbm2ddl.auto=validate
hibernate.temp.use_jdbc_metadata_defaults=false

原文地址:https://www.cnblogs.com/foreverstudy/p/14291557.html