ITPub博客

首页 > IT职业 > IT生活 > mybatis中java自动化生成dao层简单实用

mybatis中java自动化生成dao层简单实用

IT生活 作者:Lexus 时间:2021-09-09 10:01:37 0 删除 编辑

<?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>    <classPathEntry        location="mysql-connector-java-commercial-5.1.25-bin.jar" />    <context id="context1">        <commentGenerator>            <property name="suppressDate" value="true" />            <property name="suppressAllComments" value="true"/>        </commentGenerator>        <jdbcConnection driverClass="com.mysql.jdbc.Driver"            connectionURL="jdbc:mysql://192.168.47.196:3306/test"            userId="root" password="123456">        </jdbcConnection>        <javaTypeResolver>            <property name="forceBigDecimals" value="false" />        </javaTypeResolver>        <javaModelGenerator  targetPackage="cn.java.entity"            targetProject="D:TOOLsoft_javadm" />        <sqlMapGenerator targetPackage="cn.java.service"            targetProject="D:TOOLsoft_javadm" />        <javaClientGenerator targetPackage="cn.java.service.impl"            targetProject="D:TOOLsoft_javadm" type="XMLMAPPER">            <property name="enableSubPackages" value="true" />        </javaClientGenerator>        <table tableName="computers" domainObjectName="computers" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"></table></context></generatorConfiguration>


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3104/viewspace-2815349/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 深入java函数重载
请登录后发表评论 登录
全部评论

注册时间:2019-08-30

  • 博文量
    86
  • 访问量
    612