# mysql-generator-abaobo **Repository Path**: abaobo_admin/mysql-generator-abaobo ## Basic Information - **Project Name**: mysql-generator-abaobo - **Description**: No description available - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-06-17 - **Last Updated**: 2024-05-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # In all Use version 1.0.4. # mybatis-generator-limit-plugin A MyBatis Generator plugin for MySQL pagination use limit. Forked and modified from [叉烧包's maven plugin](https://github.com/wucao/mybatis-generator-limit-plugin) Modified as follows: * The origin just support xml mapper, does not support annotation java sql provider. Extended it. * Put into maven repository. ## Usage Add the plugin `` into MyBatis Generator configuration file. ``` ... ``` ### Running with Maven pom.xml ``` org.mybatis.generator mybatis-generator-maven-plugin 1.3.2 mysql mysql-connector-java 5.1.34 com.qiukeke mybatis-generator-plugin 1.0.4 true ``` Run `mvn mybatis-generator:generator` to generate java and xml files. ### Using the Generated Objects ``` XxxExample example = new XxxExample(); ... example.setLimit(10); // page size limit example.setOffset(20); // offset List list = xxxMapper.selectByExample(example); ``` If you use xml mapper, the SQL will be: `select ... limit 20, 10` If you use annotation mapper, the SQL will be: `select ... limit 10 offset 20` ``` XxxExample example = new XxxExample(); ... example.setLimit(10); // limit List list = xxxMapper.selectByExample(example); ``` If you use xml mapper, the SQL will be: `select ... limit 10` If you use annotation mapper, the SQL will be: `select ... limit 10` ### Download