{"id":21933306,"url":"https://github.com/mivui/mybatis-extension-plugin","last_synced_at":"2025-04-19T20:57:48.240Z","repository":{"id":57723773,"uuid":"264790999","full_name":"mivui/mybatis-extension-plugin","owner":"mivui","description":null,"archived":false,"fork":false,"pushed_at":"2022-11-25T01:44:21.000Z","size":62,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T13:22:41.945Z","etag":null,"topics":["mybatis","mybatis-dynamic-sql","mybatis-generator"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mivui.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-18T01:14:58.000Z","updated_at":"2023-09-18T14:47:22.000Z","dependencies_parsed_at":"2023-01-22T02:07:00.084Z","dependency_job_id":null,"html_url":"https://github.com/mivui/mybatis-extension-plugin","commit_stats":null,"previous_names":["uinio/mybatis-extension-plugin","uinios/mybatis-dynamic-plugin","mivui/mybatis-extension-plugin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivui%2Fmybatis-extension-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivui%2Fmybatis-extension-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivui%2Fmybatis-extension-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mivui%2Fmybatis-extension-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mivui","download_url":"https://codeload.github.com/mivui/mybatis-extension-plugin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249800213,"owners_count":21327021,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mybatis","mybatis-dynamic-sql","mybatis-generator"],"created_at":"2024-11-29T00:09:49.711Z","updated_at":"2025-04-19T20:57:48.211Z","avatar_url":"https://github.com/mivui.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mybatis-extension-plugin\nEnglish |  [中文](./ZH_CN.md) \n* For ease of use, align with the main version number of mybatis-generator\n* Introduction\n  * Support Mybatis3 and mybatis-dynamic-sql\n  * Note: You need to learn the use of mybatis-generator-maven-plugin first http://mybatis.org/generator/running/runningWithMaven.html\n  * Note: You need to learn the configuration of the generated file first http://mybatis.org/generator/configreference/xmlconfig.html\n  * Provide Entity, Dao extension\n  * Provide Service, Controller generation\n------\n##### Add dependency (example)\n```xml\n\n\u003cdependencies\u003e\n  \u003cdependency\u003e\n    \u003cgroupId\u003eio.github.mioxs\u003c/groupId\u003e\n    \u003cartifactId\u003emybatis-extension-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e1.4.2\u003c/version\u003e\n    \u003cscope\u003eruntime\u003c/scope\u003e\n    \u003coptional\u003etrue\u003c/optional\u003e\n  \u003c/dependency\u003e\n\u003c/dependencies\u003e\n\n\u003cbuild\u003e\n\u003cplugins\u003e\n  \u003cplugin\u003e\n    \u003cgroupId\u003eorg.mybatis.generator\u003c/groupId\u003e\n    \u003cartifactId\u003emybatis-generator-maven-plugin\u003c/artifactId\u003e\n    \u003cversion\u003e1.4.1\u003c/version\u003e\n    \u003cexecutions\u003e\n      \u003cexecution\u003e\n        \u003cid\u003eGenerate MyBatis Artifacts\u003c/id\u003e\n        \u003cphase\u003edeploy\u003c/phase\u003e\n        \u003cgoals\u003e\n          \u003cgoal\u003egenerate\u003c/goal\u003e\n        \u003c/goals\u003e\n      \u003c/execution\u003e\n    \u003c/executions\u003e\n    \u003cconfiguration\u003e\n      \u003cverbose\u003etrue\u003c/verbose\u003e\n      \u003coverwrite\u003etrue\u003c/overwrite\u003e\n    \u003c/configuration\u003e\n    \u003cdependencies\u003e\n      \u003c!--mysql As an example--\u003e\n      \u003cdependency\u003e\n        \u003cgroupId\u003emysql\u003c/groupId\u003e\n        \u003cartifactId\u003emysql-connector-java\u003c/artifactId\u003e\n        \u003cversion\u003e8.0.31\u003c/version\u003e\n      \u003c/dependency\u003e\n      \u003c!--mybatis-extension-plugin--\u003e\n      \u003cdependency\u003e\n        \u003cgroupId\u003eio.github.mioxs\u003c/groupId\u003e\n        \u003cartifactId\u003emybatis-extension-plugin\u003c/artifactId\u003e\n        \u003cversion\u003e1.4.2\u003c/version\u003e\n      \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n  \u003c/plugin\u003e\n\u003c/plugins\u003e\n\u003c/build\u003e\n```\n------\n#### Plugin usage\n\n\u003e LombokPlugin (lombok generation)\n  \n| property | defaults | introduction |\n|---------|--------|---------|\n| data | false | include getter,setter,toString,equalsAndHashCode,requiredArgsConstructor |\n| getter | false | getter |\n| setter | false | getter |\n| toString | false | toString |\n| equalsAndHashCode | false | equalsAndHashCode |\n| builder | false | builder |\n| noArgsConstructor | false | noArgsConstructor |\n| allArgsConstructor | false | allArgsConstructor |\n| requiredArgsConstructor | false | requiredArgsConstructor |\n\n##### Examples\n* The \\\u003cplugin\u003e element is a child element of the \\\u003ccontext\u003e element. Any number of plugins can be specified in the context.\n\n```xml\n\n\u003cplugin type=\"io.github.mioxs.mybatis.LombokPlugin\"\u003e\n    \u003cproperty name=\"data\" value=\"true\"/\u003e\n    \u003cproperty name=\"builder\" value=\"true\"/\u003e\n    \u003cproperty name=\"noArgsConstructor\" value=\"true\"/\u003e\n    \u003cproperty name=\"allArgsConstructor\" value=\"true\"/\u003e\n\u003c/plugin\u003e\n```\n------\n\n\u003e DomainPlugin (Entity class extension)\n\n| property | defaults | introduction |\n|---------|--------|---------|\n| serializable | false | Whether to implement Serializable |\n| dateSerialize | false | Date serialization only supports JDK 8 date types |\n| json | null | Date deserialization only supports JDK8 date types (options: fastJson, jackson) |\n\n##### Examples\n* The \\\u003cplugin\u003e element is a child element of the \\\u003ccontext\u003e element. Any number of plugins can be specified in the context.\n\n```xml\n\n\u003cplugin type=\"io.github.mioxs.mybatis.DomainPlugin\"\u003e\n    \u003cproperty name=\"serializable\" value=\"true\"/\u003e\n    \u003cproperty name=\"dateSerialize\" value=\"true\"/\u003e\n    \u003cproperty name=\"json\" value=\"jackson\"/\u003e\n\u003c/plugin\u003e\n```\n------\n\u003e RepositoryPlugin (Data Access Object DAO Extension)\n\n| property | defaults | introduction |\n|---------|--------|---------|\n| suppressAllComments | false | Whether to remove the generated comments |\n| repository | null | Dao parent class, default is null |\n##### Examples\n* The \\\u003cplugin\u003e element is a child element of the \\\u003ccontext\u003e element. Any number of plugins can be specified in the context.\n\n```xml\n\n\u003cplugin type=\"io.github.mioxs.mybatis.RepositoryPlugin\"\u003e\n    \u003cproperty name=\"suppressAllComments\" value=\"true\"/\u003e\n    \u003cproperty name=\"repository\" value=\"org.example.MybatisRepository\"/\u003e\n\u003c/plugin\u003e\n```\n------\n\u003e ServicePlugin (Service generation)\n\n| property | defaults | introduction |\n|---------|--------|---------|\n| targetProject |  null  | Generate path example: src/main/java |\n| targetPackage |  null  | generate package path example: org.example.service |\n| basicService |  null  | service interface parent class default is null |\n| basicServiceImpl |  null  | serviceImpl parent class, default is null |\n ##### Examples\n *The \\\u003cplugin\u003e element is a child element of the \\\u003ccontext\u003e element. Any number of plugins can be specified in the context.\n\n ```xml\n\n\u003cplugin type=\"io.github.mioxs.mybatis.ServicePlugin\"\u003e\n    \u003cproperty name=\"targetProject\" value=\"src/main/java\"/\u003e\n    \u003cproperty name=\"targetPackage\" value=\"org.example.service\"/\u003e\n    \u003cproperty name=\"basicService\" value=\"org.example.BaseService\"/\u003e\n    \u003cproperty name=\"basicServiceImpl\" value=\"org.example.BaseServiceImpl\"/\u003e\n\u003c/plugin\u003e\n ```\n------\n\u003e ControllerPlugin (Controller generation)\n\n| property | defaults | introduction |\n|---------|--------|---------|\n| targetProject |  null   | Generate path example: src/main/java |\n| targetPackage |  null  | Generate package path example: org.example.controller |\n| rest |  false  | true for @RestController, false for @Controller |\n| respond |  null  | The controller returns the result set. The default is null |\n##### Examples\n* The \\\u003cplugin\u003e element is a child element of the \\\u003ccontext\u003e element. Any number of plugins can be specified in the context.\n\n ```xml\n\n\u003cplugin type=\"io.github.mioxs.mybatis.ControllerPlugin\"\u003e\n    \u003cproperty name=\"targetProject\" value=\"src/main/java\"/\u003e\n    \u003cproperty name=\"targetPackage\" value=\"org.example.controller\"/\u003e\n    \u003cproperty name=\"rest\" value=\"true\"/\u003e\n    \u003cproperty name=\"respond\" value=\"org.example.Respond\"/\u003e\n\u003c/plugin\u003e\n ```\n##### Generate impressions (partial code)\n```java\n@Slf4j\n@RestController\n@RequestMapping(\"example\")\npublic class ExampleController {\n\n    @Autowired\n    private ExampleService exampleService;\n    \n    @GetMapping(\"findAll\")\n    public Respond findAll() {\n       return null;\n    }\n    //...\n}\n```\n------      \n\u003e Generate\n * Idea opens the right side  maven-\u003eplugins-\u003emybatis-generator-\u003e  mybatis-generator:generator Click to execute \n * Or  mvn mybatis-generator:generator \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmivui%2Fmybatis-extension-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmivui%2Fmybatis-extension-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmivui%2Fmybatis-extension-plugin/lists"}