MAVEN依赖:MybatisGenerator不支持PG的返回主键,写一个简单插件引入即可生成的时候自动生成返回主键
详细相关代码实现:https://github.com/fleapx/hui-mybatis-generator-plugins
pom.xml
<dependencies>
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.6</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis.generator/mybatis-generator-core -->
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.7</versio