继续浏览精彩内容
慕课网APP
程序员的梦工厂
打开
继续
感谢您的支持,我会继续努力的
赞赏金额会直接到老师账户
将二维码发送给自己后长按识别
微信支付
支付宝支付

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

慕婉清0083722
关注TA
已关注
手记 322
粉丝 72
获赞 277

<?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:\TOOL\soft_java\dm" />        <sqlMapGenerator targetPackage="cn.java.service"            targetProject="D:\TOOL\soft_java\dm" />        <javaClientGenerator targetPackage="cn.java.service.impl"            targetProject="D:\TOOL\soft_java\dm" 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>


打开App,阅读手记
0人推荐
发表评论
随时随地看视频慕课网APP