Mybatis reverse engineering configuration xml template (with comments)

<? Xml Version = "1.0" encoding = "UTF-8" ?> 
<! DOCTYPE generatorConfiguration 
        the PUBLIC "- // mybatis.org//DTD the Configuration MyBatis Generator 1.0 // EN" 
        "http://mybatis.org/dtd /mybatis-generator-config_1_0.dtd " > 
< generatorConfiguration > 
    < context ID =" DB2Tables " targetRuntime =" MyBatis 3 " > 
        <-! avoid repetition code generation widget -> 
     <-!    <plugin type =" COM. vi.tmall.util.OverlsMergeablePlugin "/> -> 
        <-! Are not generate comments -> 
        <commentGenerator>
            <property name= "suppressDate" value = "to true"  /> 
            < Property name = "suppressAllComments" value = "to true"  /> 
        </ commentGenerator > 
        <-! database account password link address -> 
        < JdbcConnection driverClass = "com.mysql. jdbc.Driver " connectionURL =" jdbc: MySQL: // localhost: 3306 / tmall_ssm " 
        userId =" root " password =" root " /> 
        ! <- this configuration element is used to specify how JDBC types and Java type conversion. -> 
        < javaTypeResolver > 
            <!-> 
            < Property name = "forceBigDecimals" value = "to false" /> 
        </ javaTypeResolver > 
        <-! TargetPackage: generating entity class name stored in the package, 
        targetProject: target path item may be an absolute or relative path ( as = targetProject "the src / main / Java") -> 
        < javaModelGenerator targetPackage = "com.vi.tmall.pojo" targetProject = "the src / main / Java" > 
            <-! enableSubPackages If true, MBG based on catalog and generating a schema sub-packets. If false it will directly targetPackage property. Defaults to false -> 
            < Property name = "enableSubPackages" value = "
            trimStrings: whether the database query results trim operation, will be generated if the set like this public void setUsername (String username) is to true -> 
            < Property name = "trimString" value = "to true"  /> 
        </ javaModelGenerator > 
        <! - generating the mapping xml file location -> 
        < sqlMapGenerator targetPackage = "Mapper" targetProject = "the src / main / Resources" > 
            < Property name = "enableSubPackages" value = "to true" /> 
        </ sqlMapGenerator > 
        <! - generating a mapper class storage position ->
        <javaClientGenerator type= "XMLMAPPER" targetPackage = "com.vi.tmall.mapper" targetProject = "the src / main / Java" > 
            < Property name = "enableSubPackages" value = "to true" /> 
        </ javaClientGenerator > 
        <-! Generated correspondence table and class name, enableXXX: XXX representing various SQL method, the property is used to specify whether to generate a corresponding statement XXX -> 
        < Table tableName = "category" domainObjectName = "the category" enableCountByExample = "to false" enableUpdateByExample = "to false" enableDeleteByExample = "false" enableSelectByExample="true" selectByExampleQueryId= "to false" > 
            < Property name = "my.isgen.usekeys" value = "to true" /> 
            <-! useActualColumnNames: If set to true, the MBG uses the column name from the database as generated metadata acquisition entity properties of the object. If false (the default), MGB will attempt to return the name into a hump in the form of -> 
            < Property name = "useActualColumnNames" value = "to true" /> 
            < generatedKey column = "ID" sqlStatement The = "the JDBC" / > 

        </ Table > 
    </ context > 
</ generatorConfiguration >

 

Guess you like

Origin www.cnblogs.com/blogforvi/p/11518849.html