Article From:

xmlThe file is configured as follows

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration
        PUBLIC "-// MyBatis Generator Configuration 1.0//EN"
        location="/Users/lyv/.m2/repository/mysql/mysql-connector-java/5.1.44/mysql-connector-java-5.1.44.jar" />
    <context id="context" targetRuntime="MyBatis3">
        <property name="javaFileEncoding" value="UTF-8" />
        <!--Note --><! --< commentGenerator type= "cn.kelaile.bigdata.common.mybatis.MyCommentGeneraTor "> --><! --& lt;; & ndash; < property name= "suppressAllComments" value= "true" /> & ndash; & gt; --><! --& lt;! & ndash; < property name= "SuPpressDate "value=" true "/> & ndash; & gt; --><! --< /commentGenerator> --&gT;<! -- configuration path -->< jdbcConnection driverClass= "com.mysql.jdbc.Driver"ConnectionURL= "jdbc:mysql:// UseSSL=false& amp; useUnicode=true& amp; Cha"RacterEncoding=utf-8& amp; allowMultiQueries=true "UserId= "root" password= "123458" /&gT;< javaModelGenerator targetPackage= "com.lyv.springboot.domain"TargetProjeCt= "/Users/lyv/Documents/ideawork/src/main/java" />< sqlMapGenerator targetPackage= "COm.lyv.springboot.mapper "TargetProject= "/Users/lyv/Documents/ideawork/src/main/java" / /Gt;< javaClientGenerator targetPackage= "com.lyv.springboot.dao"TargetProjecT= "/Users/lyv/Documents/ideawork/src/main/java"Type= "XMLMAPPER" />< tablE tableName= "customer" mapperName= "CustomerDao" domainObjectName= "Customer"EnableCouNtByExample= "false"EnableUpdateByExample= "false" enableDeleteByExample= "false"EnableSelectByExample= "false" selectByExampleQueryId= "false" >< /table>< /context>< /generatorConfiguration>

Post operation error

[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project springboot-test1: XML Parser Error on line 33: The property "mapperName" must be declared for the element type "table". -> [Help 1][ERROR][ERROR] To see the full stack trace of thE errors, re-run Maven with the -e switch.[ERROR] Re-run Maven using the -X switch to enable full DEbug logging.[ERROR][ERROR] For more information about the errors and possible solutions, pleaseRead the following articles:[ERROR] [Help 1] from the target VM, address:'', transport:'socket'Process finished with exit code 1

Answer 0:

Mapper.xml bean Error writing with database fields

Link of this Article: Mybatis generator running error

Leave a Reply

Your email address will not be published. Required fields are marked *