手机
当前位置:查字典教程网 >编程开发 >Java >mybatis generator 配置 反向生成Entity简单增删改查(推荐)
mybatis generator 配置 反向生成Entity简单增删改查(推荐)
摘要:mybatisgenerator配置反向生成Entity简单增删改查实例代码如下所示:以上所述是小编给大家介绍的mybatisgenerat...

mybatis generator 配置 反向生成Entity简单增删改查实例代码如下所示:

<"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="D:.m2repositorymysqlmysql-connector-java5.1.38mysql-connector-java-5.1.38.jar" /> <context id="DB2Tables" targetRuntime="MyBatis3"> <> <commentGenerator> <property name="suppressAllComments" value="true" /> </commentGenerator> <> <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://192.168.5.159:3306/数据库名称" userId="用户名" password="你懂得"> </jdbcConnection> <> <javaTypeResolver> <property name="forceBigDecimals" value="false" /> </javaTypeResolver> <> <javaModelGenerator targetPackage="com.heaboy.包名.base.entity" targetProject="项目名"> <property name="enableSubPackages" value="false" /> <property name="trimStrings" value="true" /> </javaModelGenerator> <> <sqlMapGenerator targetPackage="com.heaboy.包名.mybatis" targetProject="项目名"> <property name="enableSubPackages" value="false" /> </sqlMapGenerator> <> <javaClientGenerator type="XMLMAPPER" targetPackage="com.heaboy.包名.base.dao" targetProject="项目名"> <property name="enableSubPackages" value="false" /> </javaClientGenerator> <> <table tableName="表名" domainObjectName="生成的实体名" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" delimitIdentifiers="true"> <property name="useActualColumnNames" value="true" /> </table> <table tableName="表名2" domainObjectName="生成的实体名2" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"> <property name="useActualColumnNames" value="true" /> </table> </context> </generatorConfiguration>

以上所述是小编给大家介绍的mybatis generator 配置 反向生成Entity简单增删改查,希望对大家有所帮助,如果大家有任何疑问请给我们留言,小编会及时回复大家的。在此也非常感谢大家对查字典教程网的支持!

【mybatis generator 配置 反向生成Entity简单增删改查(推荐)】相关文章:

java中equals和等号(==)的区别浅谈

关于Struts2文件上传与自定义拦截器

基于Java回顾之多线程同步的使用详解

java switch语句使用注意的四大细节

java异或加密算法

基于java TCP网络通信的实例详解

java多线程编程之使用Synchronized块同步变量

java的基本数据类型及属性

基于Eclipse中SVN图标不显示的解决方法

Java字符编码解码的实现详解

精品推荐
分类导航