springboot-mybatis-generator 自动生成代码
2018-02-28 14:01
447 查看
参考博客 http://blog.csdn.net/winter_chen001/article/details/77249029
github
知识点 1 Tools->> RestFul Web Service 代替posman测试 Controller
generotal 插件的使用
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<configurationFile>${basedir}/src/main/resources/generator/generatorConfig.xml</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
</plugin>
入口 pom 文件 路径
通过maven 命令 启动
mybatis-generator:generate -e
生成 mapper 文件
使用方法
import com.github.pagehelper.PageHelper;
github
知识点 1 Tools->> RestFul Web Service 代替posman测试 Controller
generotal 插件的使用
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<configurationFile>${basedir}/src/main/resources/generator/generatorConfig.xml</configurationFile>
<overwrite>true</overwrite>
<verbose>true</verbose>
</configuration>
</plugin>
入口 pom 文件 路径
通过maven 命令 启动
mybatis-generator:generate -e
生成 mapper 文件
知识点 3 分页插件的使用
pom 文件的引入<!-- 分页插件 --> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>1.1.2</version> </dependency>
使用方法
import com.github.pagehelper.PageHelper;
//将参数传给这个方法就可以实现物理分页了,非常简单。 PageHelper.startPage(pageNum, pageSize); return userMapper.selectAllUser();
相关文章推荐
- 基于SpringBoot+Springmvc+mybatis+mybatis-generator代码自动生成的框架。
- SpringBoot学习-如何使用mybatis-generator-maven-plugin自动生成代码
- Intellij IDEA springboot maven 配置mybatis-generator,自动从数据库中生成代码
- SpringBoot学习教程 - 06 - 集成MyBatis Generator自动生成代码
- SpringBoot系列: 使用MyBatis maven插件自动生成java代码
- SpringBoot之mybatis-generator自动生成
- spring boot 自动生成mybatis代码
- 【完美】SpringBoot+Mybatis-Generator自动生成
- spring boot配置mybatis代码自动生成(mybatis通用mapper相关基础代码自动生成)
- 使用Eclipse的Generator MyBatis/iBatis Artifacts插件自动生成代码,与spring集成
- (二十二)SpringBoot之使用mybatis generator自动生成bean、mapper、mapper xml
- Springboot:用mybatis-generator自动生成bean和dao
- 在Spring Boot中使用MyBatis并且自动生成代码
- 使用Eclipse的Generator MyBatis/iBatis Artifacts插件自动生成代码,与spring集成
- spring boot中使用generator插件自动生成代码
- SpringBoot+mybatis plus的代码自动生成
- springboot使用generator-mybatis插件自动生成mybatis文件
- Spring Boot (七)MyBatis代码自动生成和辅助插件
- springboot(四) 用mybatis-generator自动生成bean和dao
- idea 搭建 springMVC+mybatis+maven 项目(三)mybatis-generater自动生成MyBatis代码