You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
3.7 KiB
XML

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<?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>
<!--mysql 连接数据库jar 这里选择自己本地位置;
如果不知道maven本地仓库地址可以使用EveryThing工具全局搜索mysql-connector-java找到jar包位置
也可以手动下载一个jar放在指定位置进行引用。
-->
<classPathEntry location="D:/Program Files/maven/maven-repository/mysql/mysql-connector-java/8.0.21/mysql-connector-java-8.0.21.jar"/>
<context id="testTables" targetRuntime="MyBatis3">
<commentGenerator>
<!-- 是否去除自动生成的注释,true是,false:否 -->
<property name="suppressAllComments" value="true"/>
</commentGenerator>
<!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/warehouse?serverTimezone=GMT%2B8&amp;useUnicode=true&amp;characterEncoding=UTF-8&amp;zeroDateTimeBehavior=convertToNull&amp;useSSL=false" userId="root"
password="123456">
<property name="nullCatalogMeansCurrent" value="true" />
</jdbcConnection>
<!-- 默认false把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer为 true时把JDBC DECIMAL 和
NUMERIC 类型解析为java.math.BigDecimal -->
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 指定javaBean生成的位置
targetPackage生成的类要放的包真实的包受enableSubPackages属性控制
targetProject目标项目指定一个存在的目录下生成的内容会放到指定目录中如果目录不存在MBG不会自动建目录
-->
<javaModelGenerator targetPackage="com.glxp.udidl.admin.entity.inout" targetProject="src/main/java">
<!-- 在targetPackage的基础上根据数据库的schema再生成一层package最终生成的类放在这个package下默认为false如果多个数据库改为true分目录 -->
<property name="enableSubPackages" value="true"/>
<!-- 设置是否在getter方法中对String类型字段调用trim()方法 -->
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 指定mapper映射文件生成的位置
targetPackage、targetProject同javaModelGenerator中作用一样-->
<sqlMapGenerator targetPackage="mybatis.mapper.inout" targetProject="src/main/resources">
<property name="enableSubPackages" value="false"/>
</sqlMapGenerator>
<!-- 指定mapper接口生成的位置
targetPackage、targetProject同javaModelGenerator中作用一样
-->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.glxp.udidl.admin.dao.inout" targetProject="src/main/java">
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
<!-- 指定数据库表
domainObjectName生成的domain类的名字,当表名和domain类的名字有差异时一定要设置如果不设置直接使用表名作为domain类的名字
可以设置为somepck.domainName那么会自动把domainName类再放到somepck包里面
-->
<table tableName="druginfo" schema="warehouse"></table>
<!--<table tableName="receiptsdetail" schema="warehouse"></table>-->
</context>
</generatorConfiguration>