码迷,mamicode.com
首页 > 编程语言 > 详细

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

时间:2018-04-30 16:43:54      阅读:156      评论:0      收藏:0      [点我收藏+]

标签:mybatis中java自动化生成dao

<?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>

技术分享图片

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

标签:mybatis中java自动化生成dao

原文地址:http://blog.51cto.com/357712148/2109239

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!