https://github.com/yuanwenqing/mds-generator
Generator from Java POJO for XXDynamicSqlSupport in Mybatis Dynamic Sql
https://github.com/yuanwenqing/mds-generator
mybatis mybatis-dynamic-sql mybatis-generator
Last synced: 11 months ago
JSON representation
Generator from Java POJO for XXDynamicSqlSupport in Mybatis Dynamic Sql
- Host: GitHub
- URL: https://github.com/yuanwenqing/mds-generator
- Owner: YuanWenqing
- License: apache-2.0
- Created: 2021-09-17T06:26:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-09-27T08:44:36.000Z (over 4 years ago)
- Last Synced: 2025-06-08T21:40:22.219Z (about 1 year ago)
- Topics: mybatis, mybatis-dynamic-sql, mybatis-generator
- Language: Java
- Homepage:
- Size: 81.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Mybatis DynamicSqlSupport Generator
Generator from Java POJO for XXDynamicSqlSupport in Mybatis Dynamic Sql
# Requirements
* JDK>=8
* Gradle>=7
# Gradle
~~~groovy
implementation("xyz.codemeans.mybatis:mds-annotation:1.2")
implementation("xyz.codemeans.mybatis:mds-generator:1.2")
~~~
# Example
See:
* [`mds-generator/src/test/java/mds/example/ExampleApplication.java`](https://github.com/YuanWenqing/mds-generator/blob/main/mds-example/src/main/java/mds/example/ExampleApplication.java)
* [`mds-generator/src/test/java/mds/example/ExampleMain.java`](https://github.com/YuanWenqing/mds-generator/blob/main/mds-example/src/main/java/mds/example/ExampleMain.java)
* [`mds-generator/src/test/resources/application.properties`](https://github.com/YuanWenqing/mds-generator/blob/main/mds-example/src/main/resources/application.properties)
Usage:
1. Import `mds-annotation` into model module, and then annotated classes to generate Mybatis DynamicSqlSupport from.
2. Import `mds-generator` into some module, and then make a Spring Application class like the `ExampleApplication` or just a main class to initialize`GeneratorRunner` corretly like `ExampleMain`.
3. Config some generation tasks for the generator.
4. Run the main class, and you'll get all needed DynamicSqlSupport classes generated!😁
Download this project and run the `ExampleApplication` for a try.