SpringBoot 添加mybatis generator 自动生成代码插件
2021-10-06 05:14
标签:src file 接口 .com dir 表名 note name 添加 自动生成数据层代码,提高开发效率 1.pom添加插件,并指定配置文件路径 org.mybatis.generator mybatis-generator-maven-plugin 1.3.5 ${basedir}/src/main/resources/generatorConfig.xml true true 2.添加配制文件 generatorConfig.xml,generator.properties jdbc.driverLocation=E:/46maven/mysql/mysql-connector-java/5.1.40/mysql-connector-java-5.1.40.jar jdbc.driverClass=com.mysql.jdbc.Driver jdbc.connectionURL=jdbc:mysql://localhost:3306/alishare?useUnicode=true&characterEncoding=utf-8 jdbc.userId=root jdbc.password=123456 DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"> 3.配置成功后找到插件点Run 4.查看生成日志,成功 [INFO] Generating Mapper Interface for table orderbaiduinfo [INFO] Generating SQL Map for table orderbaiduinfo [INFO] Saving file OrderBaiduInfoMapper.xml [INFO] Saving file OrderBaiduInfo.java [INFO] Saving file OrderBaiduInfoMapper.java [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS 5.查看生成文件 SpringBoot 添加mybatis generator 自动生成代码插件标签:src file 接口 .com dir 表名 note name 添加 原文地址:https://www.cnblogs.com/Guroer/p/10223981.html
文章标题:SpringBoot 添加mybatis generator 自动生成代码插件
文章链接:http://soscw.com/index.php/essay/108407.html