add a example for mybatis, format markdown#78
Merged
CritasWang merged 8 commits intoapache:masterfrom Jun 4, 2025
xiaoyekanren:zzm
Merged
add a example for mybatis, format markdown#78CritasWang merged 8 commits intoapache:masterfrom xiaoyekanren:zzm
CritasWang merged 8 commits intoapache:masterfrom
xiaoyekanren:zzm
Conversation
* add default param * Update readme.md --------- Co-authored-by: 2b3c511 <rong.li@timecho.com> Co-authored-by: CritasWang <critas@outlook.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a complete MyBatis Generator example under examples/mybatis-generator, updates the example project’s POM and resource includes, and corrects markdown fences in the primary README files to use XML highlighting.
- Reformatted code fences in
mybatis-generator/README.mdandmybatis-generator/README-zh.mdfromjava toxml. - Introduced example MyBatis config files, mapper XML, Java model & mapper interfaces, and a
Main.javademo. - Updated
examples/mybatis-generator/pom.xmlwith needed dependencies and resource settings, and improved example README to reflect the new setup.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| mybatis-generator/README.md | Changed snippet fences to XML for pom configuration |
| mybatis-generator/README-zh.md | Same fence fix for Chinese README |
| examples/mybatis-generator/src/main/resources/mybatis-config.xml | Added core MyBatis configuration |
| examples/mybatis-generator/src/main/resources/generatorConfigByExample.xml | Added “by example” generator configuration |
| examples/mybatis-generator/src/main/resources/generatorConfig.xml | Updated classPathEntry placeholder and added table flag |
| examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/xml/MixMapper.xml | Added mapper XML for Mix entity |
| examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/model/Mix.java | Added Mix model class with Swagger schema annotations |
| examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/plugin/mapper/MixMapper.java | Added mapper interface for Mix |
| examples/mybatis-generator/src/main/java/org/apache/iotdb/mybatis/Main.java | Demo application for insert/select/delete/batch |
| examples/mybatis-generator/pom.xml | Added MyBatis, Lombok, Springdoc, IoTDB-JDBC dependencies and resources |
| examples/mybatis-generator/README.md | Updated SQL snippet, generator instructions, and output file list |
Comments suppressed due to low confidence (3)
examples/mybatis-generator/README.md:110
- The README lists
MixExample.javaas an output, but that file isn't included in this example. Consider removing it or clarifying that it's generated at runtime.
org/apache/iotdb/mybatis/plugin/model/MixExample.java
examples/mybatis-generator/src/main/resources/generatorConfig.xml:21
- This placeholder path needs to be replaced by the actual JAR location in user projects. Please document that
/path/to/iotdb-jdbc.jaris meant as an example.
<classPathEntry location="/path/to/iotdb-jdbc.jar"/>
examples/mybatis-generator/README.md:64
- [nitpick] Consider labeling the SQL block with ```sql for syntax highlighting clarity instead of a generic code fence.
</details>
2b3c511
suggested changes
Jun 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.