首页 > 编程语言 > 详细

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

时间:2018-04-30 16:32:15      阅读:147      评论:0      收藏: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:\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层简单实用

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!