Springboot整合Mybatis配置Maven的generator插件

2021-02-01 16:14

阅读:687

标签:comment   amp   自动生成   string   位置   ESS   config   image   lse   

1,添加依赖

  技术图片

 

2,配置文件

  

xml version="1.0" encoding="UTF-8"?>
DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
generatorConfiguration>
    

    
    context id="DB2Tables" targetRuntime="MyBatis3">
        commentGenerator>
            
            property name="suppressAllComments" value="true" />
        commentGenerator>
        
        jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/demo" userId="root" password="123.com">
        jdbcConnection>
        javaTypeResolver>
            property name="forceBigDecimals" value="false" />
        javaTypeResolver>
        
        javaModelGenerator targetPackage="com.bdqn.springbootmybatis.pojo" targetProject=".\src\main\java">
            
            property name="enableSubPackages" value="true" />
            
            property name="trimStrings" value="true" />
        javaModelGenerator>
        
        sqlMapGenerator targetPackage="com.bdqn.springbootmybatis.mapper" targetProject=".\src\main\java">
            
            property name="enableSubPackages" value="true" />
        sqlMapGenerator>
        
        javaClientGenerator type="XMLMAPPER" targetPackage="com.bdqn.springbootmybatis.mapper" targetProject=".\src\main\java">
            
            property name="enableSubPackages" value="true" />
        javaClientGenerator>
        
     
context> generatorConfiguration>

 

3,运行

  技术图片

 

 

  技术图片  

 

  技术图片

 

 

 

   

 

Springboot整合Mybatis配置Maven的generator插件

标签:comment   amp   自动生成   string   位置   ESS   config   image   lse   

原文地址:https://www.cnblogs.com/yz-bky/p/12813339.html


评论


亲,登录后才可以留言!