mybatis利用generator自动生成的代码

 

    /**
     * 排序规则
     */
    protected String orderByClause;
    /**
     * 去重规则
     */
    protected boolean distinct;
    /**
     * where条件集合
     */
    protected List<Criteria> oredCriteria;

 

 

          

 

    <!-- location指的是mysql驱动jar路径 -->
    <classPathEntry    location="D:\\TONG\\mybatiscreater\\mysql-connector-java-5.1.43.jar"/>

 

 

<jdbcConnection driverClass="com.mysql.jdbc.Driver"      connectionURL="jdbc:mysql://localhost:3306/jdsc?characterEncoding=utf8" 
                                                              userId="root" password="root">
</jdbcConnection>

 

 

 

        <!-- 实体类生成的地方 -->
        <javaModelGenerator targetPackage="com.yt.jd.entity"
                            targetProject="D://TONG//mybatiscreater">
            <property name="enableSubPackages" value="true"/>
            <property name="trimStrings" value="true"/>
        </javaModelGenerator>

 

        <!--生成 mybaits mapper层xml对象--><!-- 此层必须在dao对象上面 -->
        <sqlMapGenerator targetPackage="com.yt.jd.mybaits"
                         targetProject="D://TONG//mybatiscreater">
            <property name="enableSubPackages" value="true"/>
        </sqlMapGenerator>

 

        <!--生成 mybaits mapper层 dao 对象-->
        <javaClientGenerator targetPackage="com.yt.jd.dao"
                             targetProject="D://TONG//mybatiscreater" type="XMLMAPPER">
            <property name="enableSubPackages" value="true"/>
        </javaClientGenerator>

 

        <!-- 表名/实体类名 -->
        <table tableName="supplier_bidding" domainObjectName="SupplierBidding"
               enableCountByExample="false" enableUpdateByExample="false"
               enableDeleteByExample="false" enableSelectByExample="true"
               selectByExampleQueryId="false">
            <!--<columnRenamingRule searchString="^D_"
                                replaceString=""/>-->
        </table>

 

 

 

排序规则

posted @ 2017-09-16 10:24  壹品轩  阅读(202)  评论(0编辑  收藏  举报