mybatis-generator.xml在哪里下载
mybatis-generator.xml在哪里下载
mybatis-generator.xml在哪里下载
2019-03-06
<?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> <context id="mybatis" targetRuntime="MyBatis3"> <!--自动实现Serializable接口--> <plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin> <!-- 去除自动生成的注释 --> <commentGenerator> <property name="suppressAllComments" value="true"/> </commentGenerator> <!--数据库基本信息--> <jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://10.223.25.82:3306/shopmall" userId="root" password="123456"> </jdbcConnection> <javaTypeResolver> <property name="forceBigDecimals" value="true"/> <property name="useJSR310Types" value="true"/> </javaTypeResolver> <!--生成实体类的位置以及包的名字--> <!--同样Mac用户:targetProject 为全路径--> <javaModelGenerator targetPackage="com.ireeder.order.domain.entity" targetProject="src/main/java"> <!-- enableSubPackages:是否让schema作为包的后缀 --> <property name="enableSubPackages" value="true"/> <!-- 从数据库返回的值被清理前后的空格 --> <property name="trimStrings" value="true"/> </javaModelGenerator> <!--生成映射文件存放位置--> <!--同样Mac用户:targetProject 为全路径--> <sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources"> <!-- enableSubPackages:是否让schema作为包的后缀 --> <property name="enableSubPackages" value="false"/> </sqlMapGenerator> <!--生成Dao类存放位置,mapper接口生成的位置--> <!--同样Mac用户:targetProject 为全路径--> <javaClientGenerator type="XMLMAPPER" targetPackage="com.shopmall.order.domain.mapper" targetProject="src/main/java"> <!-- enableSubPackages:是否让schema作为包的后缀 --> <property name="enableSubPackages" value="false"/> </javaClientGenerator> <table schema="shopmall" tableName="coupon_item" domainObjectName="CouponItemEntity" enableCountByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByPrimaryKeyQueryId="true" enableUpdateByExample="false"> <columnOverride column="updated_at" javaType="java.time.LocalDateTime"/> <columnOverride column="created_at" javaType="java.time.LocalDateTime"/> <columnOverride column="validity" javaType="java.lang.Boolean"/> </table> </context></generatorConfiguration>
举报