|
|
@ -5,9 +5,9 @@ import org.hibernate.dialect.*; |
|
|
|
import java.sql.Driver; |
|
|
|
import java.sql.Driver; |
|
|
|
|
|
|
|
|
|
|
|
public enum DBType { |
|
|
|
public enum DBType { |
|
|
|
mysql5(com.mysql.jdbc.Driver.class, MySQL5Dialect.class), |
|
|
|
mysql5(com.mysql.cj.jdbc.Driver.class, MySQL5Dialect.class), |
|
|
|
mysql55(com.mysql.jdbc.Driver.class, MySQL55Dialect.class), |
|
|
|
mysql55(com.mysql.cj.jdbc.Driver.class, MySQL55Dialect.class), |
|
|
|
mysql57(com.mysql.jdbc.Driver.class, MySQL57Dialect.class), |
|
|
|
mysql57(com.mysql.cj.jdbc.Driver.class, MySQL57Dialect.class), |
|
|
|
mysql8(com.mysql.cj.jdbc.Driver.class, MySQL8Dialect.class); |
|
|
|
mysql8(com.mysql.cj.jdbc.Driver.class, MySQL8Dialect.class); |
|
|
|
|
|
|
|
|
|
|
|
private Class<? extends Driver> driver; |
|
|
|
private Class<? extends Driver> driver; |
|
|
@ -33,7 +33,8 @@ public enum DBType{ |
|
|
|
case mysql57: |
|
|
|
case mysql57: |
|
|
|
case mysql8: |
|
|
|
case mysql8: |
|
|
|
return "jdbc:mysql://" + host + ":" + port + "/" + name + "?serverTimezone=GMT%2b8"; |
|
|
|
return "jdbc:mysql://" + host + ":" + port + "/" + name + "?serverTimezone=GMT%2b8"; |
|
|
|
default:throw new RuntimeException("NotFound type:"+this.name()); |
|
|
|
default: |
|
|
|
|
|
|
|
throw new RuntimeException("NotFound type:" + this.name()); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|