diff --git a/build.gradle b/build.gradle index f5a3b9c..f3c0194 100644 --- a/build.gradle +++ b/build.gradle @@ -51,7 +51,7 @@ uploadArchives { authentication(userName: NEXUS_USERNAME, password: NEXUS_PASSWORD) } pom.project { - version '2.0.3' + version '2.0.4' artifactId ARTIFACT_Id groupId GROUP_ID packaging TYPE diff --git a/src/main/java/com/taover/repository/CustomJdbcTemplate.java b/src/main/java/com/taover/repository/CustomJdbcTemplate.java index 112c9ce..6125d43 100644 --- a/src/main/java/com/taover/repository/CustomJdbcTemplate.java +++ b/src/main/java/com/taover/repository/CustomJdbcTemplate.java @@ -54,10 +54,12 @@ public class CustomJdbcTemplate { throw new Exception("DAO层初始化失败,失败原因:"+tClassInfo.getName()+"实体类,没有@Table注解指定表名"); } this.tableName = annoTable.name(); - if(annoTable.schema() != null){ - this.dbName = annoTable.schema(); - }else if(annoTable.catalog() != null){ - this.dbName = annoTable.catalog(); + String schema = annoTable.schema(); + String catalog = annoTable.catalog(); + if(schema != null && !"".equals(schema)){ + this.dbName = schema; + }else if(catalog != null && !"".equals(catalog)){ + this.dbName = catalog; } //初始化数据 -- libgit2 0.21.2