Skip to content

Commit

Permalink
Merge pull request zouzg#211 from KingPanda888/master
Browse files Browse the repository at this point in the history
修改生成pojo对象中不生成字段注释的问题
  • Loading branch information
zouzg authored Dec 6, 2018
2 parents 2c95b6c + b21787b commit 4792bdb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ Eclipse or IntelliJ IDEA中启动, 找到```com.zzg.mybatis.generator.MainUI```

### 赞助
本工具纯属个人业余时间开发与维护,如果你觉得软件对你有用,欢迎赞助,金额随意 :)

<img src="https://user-images.githubusercontent.com/3505708/38162358-423d2d18-3512-11e8-9b52-c188bf37671d.png" width="200"> <img src="https://user-images.githubusercontent.com/3505708/38162365-56f8f55c-3512-11e8-8fd8-b8ae4f0ad3c8.png" width="200">

- - -
Licensed under the Apache 2.0 License

Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,16 @@ public void generate() throws Exception {
}

JDBCConnectionConfiguration jdbcConfig = new JDBCConnectionConfiguration();
// http://www.mybatis.org/generator/usage/mysql.html
if (DbType.MySQL.name().equals(dbType) || DbType.MySQL_8.name().equals(dbType)) {
jdbcConfig.addProperty("nullCatalogMeansCurrent", "true");
}
jdbcConfig.setDriverClass(DbType.valueOf(dbType).getDriverClass());
jdbcConfig.setConnectionURL(DbUtil.getConnectionUrlWithSchema(selectedDatabaseConfig));
jdbcConfig.setUserId(selectedDatabaseConfig.getUsername());
jdbcConfig.setPassword(selectedDatabaseConfig.getPassword());
if(DbType.Oracle.name().equals(dbType)){
jdbcConfig.getProperties().setProperty("remarksReporting", "true");
}
// java model
JavaModelGeneratorConfiguration modelConfig = new JavaModelGeneratorConfiguration();
modelConfig.setTargetPackage(generatorConfig.getModelPackage());
Expand Down

0 comments on commit 4792bdb

Please sign in to comment.