mybatis-generator.xml

在这里插入图片描述
在这里插入图片描述
mybatis-generator.xml:

<?xml version="1.0" encoding="UTF-8"?>
<context id="myBatis3"  targetRuntime="MyBatis3">
    <!--数据库链接地址账号密码-->
    <jdbcConnection driverClass="com.mysql.jdbc.Driver"
                    connectionURL="jdbc:mysql://127.0.0.1:3306/miaosha" userId="root" password="root">
    </jdbcConnection>

    <!--生成DataObject类存放位置-->
    <javaModelGenerator targetPackage="com.miaosha.pro.dataobject" targetProject="src/main/java">
        <property name="enableSubPackages" value="true"/>
        <property name="trimStrings" value="true"/>
    </javaModelGenerator>

    <!--生成映射文件存放位置-->
    <sqlMapGenerator targetPackage="mapping" targetProject="src/main/resources">
        <property name="enableSubPackages" value="true"/>
    </sqlMapGenerator>

    <!--生成Dao类存放位置-->
    <javaClientGenerator type="XMLMAPPER" targetPackage="com.miaosha.pro.dao"
                         targetProject="src/main/java">
        <property name="enableSubPackages" value="true"/>
    </javaClientGenerator>

    <!--生成对应表及类名-->
    <table tableName="user_info" domainObjectName="UserDO" enableCountByExample="false"
           enableUpdateByExample="false" enableDeleteByExample="false"
           enableSelectByExample="false" selectByExampleQueryId="false" ></table>
    <table tableName="user_password" domainObjectName="UserPasswordDO" enableCountByExample="false"
           enableUpdateByExample="false" enableDeleteByExample="false"
           enableSelectByExample="false" selectByExampleQueryId="false"></table>
</context>

版权声明:本文为wcc178399原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。