Druid如何自动根据URL自动识别DriverClass的

Druid是根据url前缀来识别DriverClass的,这样使得配置更方便简洁。

前缀 DriverCLass 描述信息
jdbc:odps com.aliyun.odps.jdbc.OdpsDriver  
jdbc:derby org.apache.derby.jdbc.EmbeddedDriver  
jdbc:mysql com.mysql.jdbc.Driver  
jdbc:oracle oracle.jdbc.driver.OracleDriver  
jdbc:microsoft com.microsoft.jdbc.sqlserver.SQLServerDriver  
jdbc:sybase:Tds com.sybase.jdbc2.jdbc.SybDriver  
jdbc:jtds net.sourceforge.jtds.jdbc.Driver  
jdbc:postgresql org.postgresql.Driver  
jdbc:fake com.alibaba.druid.mock.MockDriver  
jdbc:mock com.alibaba.druid.mock.MockDriver  
jdbc:hsqldb org.hsqldb.jdbcDriver  
jdbc:db2 COM.ibm.db2.jdbc.app.DB2Driver DB2的JDBC Driver十分混乱,这个匹配不一定对
jdbc:sqlite org.sqlite.JDBC  
jdbc:ingres com.ingres.jdbc.IngresDriver  
jdbc:h2 org.h2.Driver  
jdbc:mckoi com.mckoi.JDBCDriver  
jdbc:cloudscape COM.cloudscape.core.JDBCDriver  
jdbc:informix-sqli com.informix.jdbc.IfxDriver  
jdbc:timesten com.timesten.jdbc.TimesTenDriver  
jdbc:as400 com.ibm.as400.access.AS400JDBCDriver  
jdbc:sapdb com.sap.dbtech.jdbc.DriverSapDB  
jdbc:JSQLConnect com.jnetdirect.jsql.JSQLDriver  
jdbc:JTurbo com.newatlanta.jturbo.driver.Driver  
jdbc:firebirdsql org.firebirdsql.jdbc.FBDriver  
jdbc:interbase interbase.interclient.Driver  
jdbc:pointbase com.pointbase.jdbc.jdbcUniversalDriver  
jdbc:edbc ca.edbc.jdbc.EdbcDriver  
jdbc:mimer:multi1 com.mimer.jdbc.Driver
posted @ 2017-03-01 14:02  左正  阅读(3257)  评论(0编辑  收藏  举报