Skip to content

Commit

Permalink
1. fix定制列时如果系统表中有相同的字段会加载系统表的列进来的bug
Browse files Browse the repository at this point in the history
2. Oracle驱动默认使用更新的ojdbc6.jar
  • Loading branch information
zouzg committed Dec 2, 2018
1 parent 01360f3 commit 9cbd43e
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/zzg/mybatis/generator/model/DbType.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public enum DbType {

MySQL("com.mysql.jdbc.Driver", "jdbc:mysql://%s:%s/%s?useUnicode=true&useSSL=false&characterEncoding=%s", "mysql-connector-java-5.1.38.jar"),
MySQL_8("com.mysql.cj.jdbc.Driver", "jdbc:mysql://%s:%s/%s?serverTimezone=UTC&useUnicode=true&useSSL=false&characterEncoding=%s", "mysql-connector-java-8.0.11.jar"),
Oracle("oracle.jdbc.driver.OracleDriver", "jdbc:oracle:thin:@%s:%s:%s", "ojdbc14.jar"),
Oracle("oracle.jdbc.OracleDriver", "jdbc:oracle:thin:@//%s:%s/%s", "ojdbc6.jar"),
PostgreSQL("org.postgresql.Driver", "jdbc:postgresql://%s:%s/%s", "postgresql-9.4.1209.jar"),
SQL_Server("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://%s:%s;databaseName=%s", "sqljdbc4-4.0.jar"),
Sqlite("org.sqlite.JDBC", "jdbc:sqlite:%s", "sqlite-jdbc-3.19.3.jar");
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/zzg/mybatis/generator/util/DbUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public static List<UITableColumnVO> getTableColumns(DatabaseConfig dbConfig, Str
Connection conn = getConnection(dbConfig);
try {
DatabaseMetaData md = conn.getMetaData();
ResultSet rs = md.getColumns(null, null, tableName, null);
ResultSet rs = md.getColumns(dbConfig.getSchema(), null, tableName, null);
List<UITableColumnVO> columns = new ArrayList<>();
while (rs.next()) {
UITableColumnVO columnVO = new UITableColumnVO();
Expand Down
Binary file removed src/main/resources/lib/ojdbc14.jar
Binary file not shown.
Binary file added src/main/resources/lib/ojdbc6.jar
Binary file not shown.

0 comments on commit 9cbd43e

Please sign in to comment.