<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE generatorConfigurationPUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN""http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd"><generatorConfiguration><!--可以改--><!--<properties resource="jdbc.properties"/>--><!-- 数据库驱动 --><!--可以改--><classPathEntry location="D:\Maven\Repository\mysql\mysql-connector-java8円.0.15\mysql-connector-java-8.0.15.jar"/><context id="DB2Tables" targetRuntime="MyBatis3"><commentGenerator><property name="suppressDate" value="true"/><!-- 是否去除自动生成的注释 true:是 : false:否 --><property name="suppressAllComments" value="true"/></commentGenerator><!--数据库链接URL,用户名、密码 --><!--<jdbcConnection driverClass="${jdbc.driver}"connectionURL="${jdbc.url}" userId="${jdbc.username}" password="${jdbc.password}"></jdbcConnection>--><!--可以改--><!--如上:可以设置为变量的形式--><!--MySQL 8.x 需要指定服务器的时区【!!!】--><jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"connectionURL="jdbc:mysql://localhost:3306/github?serverTimezone=GMT&useSSL=false"userId="root" password="mysql"><!--<property name="serverTimezone" value="UTC"/>--><!--我添加的。表示可以防止重复问题???--><!--MySQL 不支持 schema 或者 catalog 所以需要添加这个--><!--参考 : http://www.mybatis.org/generator/usage/mysql.html--><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><!-- 生成模型的包名和位置 --><!--改--><!--实体类??--><javaModelGenerator targetPackage="com.soecode.lyf.entity"targetProject="src/main/java"><!-- enableSubPackages:是否让schema作为包的后缀 --><property name="enableSubPackages" value="true"/><!-- 从数据库返回的值被清理前后的空格 --><property name="trimStrings" value="true"/></javaModelGenerator><!-- 生成映射文件的包名和位置XML文件 --><!--改,dao的xml实现--><!--targetProject也要改--><sqlMapGenerator targetPackage="mapper"targetProject="src/main/resources"><property name="enableSubPackages" value="true"/></sqlMapGenerator><!-- 生成DAO的包名和位置 --><!--改,dao层接口--><javaClientGenerator type="XMLMAPPER"targetPackage="com.soecode.lyf.dao" targetProject="src/main/java"><property name="enableSubPackages" value="true"/></javaClientGenerator><!-- 要生成哪些表 --><!-- tableName:用于自动生成代码的数据库表;domainObjectName:对应于数据库表的javaBean类名 --><!--book_info数据库表明--> <!--别名Book_Info pojo(实体类明)--><!--改--><!--schema="github"指定数据库,防止重名问题--><!--<table tableName="store"domainObjectName="Store"enableCountByExample="false"enableUpdateByExample="false"enableDeleteByExample="false"enableSelectByExample="false"selectByExampleQueryId="false"></table><!–这里有一个事故,就是前两行都要改,否则要出事故。–><!–代码生成有风险,操作需谨慎。毕竟有文件读写。–><table tableName="storeregistration"domainObjectName="StoreRegistration"enableCountByExample="false"enableUpdateByExample="false"enableDeleteByExample="false"enableSelectByExample="false"selectByExampleQueryId="false"></table>--><table tableName="pettradinglist"domainObjectName="pettradinglist"enableCountByExample="false"enableUpdateByExample="false"enableDeleteByExample="false"enableSelectByExample="false"selectByExampleQueryId="false"></table><!--需不需要更改其他属性,了解其他属性???这样可以更加熟悉这个文件。--><!--这个文件大概需要两到三个jar包,才能运行,然后在IDEA的plugins里插入我们使用的mybatis-generator自动生成工具。--><!--可以成功生成dao层全部文件。以及实体类。可以调用的。于是只要写Service层即可。以及把Controller层写写好即可。--></context></generatorConfiguration>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。