This is a major release of the generator. Please read the detailed release notes here: https://mybatis.org/generator/whatsNew.html
Major changes in the generator include:
- Java 17 or greater is now required
- The generator now supports Java merging in the base product. Eclipse is no longer a required execution environment for this feature
- The generator can build Java records for database models in all runtimes except Kotlin
- We've included two new plugins specifically for records - one that adds a fluent builder, and another that adds "with" methods. These plugins can make records easier to work with if your table has a large number of fields
- The Kotlin runtime now builds more idiomatic immutable data classes for database models
- The generator has been updated to use JSpecify to fully document the null capabilities of the library. In addition, we've included a new plugin to generate appropriate JSpecify annotations in the generated code if you wish to adopt JSpecify in your own usage
There are many other changes, and there are some breaking changes as well. We've tried to keep the breaking changes to a minimum, but some were necessary as we've also completed a major modernization and refactoring of the entire code base.
Please feel free to ask questions if you experience difficulties or find issues.
The GitHub milestone for this release is here: https://github.com/mybatis/generator/issues?q=milestone%3A2.0.0
The new artifacts are available in Maven central at
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>2.0.0</version>
</dependency>and
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>2.0.0</version>
</dependency>You can install the eclipse feature from the eclipse market place here: https://marketplace.eclipse.org/content/mybatis-generator