<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Spring中使用Mybatis逆向工程(IDEA版)

      準(zhǔn)備工作,首先配置好

      pom.xml文件

      導(dǎo)入必要的包:

      <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
      <dependency>
      <groupId>org.mybatis</groupId>
      <artifactId>mybatis</artifactId>
      <version>3.5.6</version>
      </dependency>
      <!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
      <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>8.0.22</version>
      </dependency>
      添加插件
      <build>
      <pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
      <plugins>
      <!-- plugin:具體插件 -->
      <plugin>
      <groupId>org.mybatis.generator</groupId>
      <artifactId>mybatis-generator-maven-plugin</artifactId>
      <version>1.3.2</version>
      <dependencies>
      <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>8.0.22</version>
      </dependency>
      </dependencies>
      </plugin>
      </plugins>
      </pluginManagement>
      </build>

      配置generator.properties文件,里面主要放連接數(shù)據(jù)庫的驅(qū)動之類的配置。

      jdbc.driver=com.mysql.cj.jdbc.Driver
      jdbc.url=jdbc:mysql://127.0.0.1:3306/product_test?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
      jdbc.username=root
      jdbc.password=root

      然后在配置generatorConfig.xml文件
      <?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>
      <!-- <properties resource="mybatis.properties" />
      -->
      <!-- <classPathEntry location="該jar包的位置\mysql\mysql-connector-java\8.0.15\mysql-connector-java-8.0.15.jar" />-->
      <!--加載資源文件-->
      <properties resource="generator.properties"></properties>
      <context id="msqlTables" targetRuntime="MyBatis3">
      <plugin type="org.mybatis.generator.plugins.SerializablePlugin"></plugin>
      <commentGenerator>
      <!--是否去除自動生成的注釋 true是:false 否-->
      <property name="suppressAllComments" value="true"/>
      </commentGenerator>
      <jdbcConnection connectionURL="${jdbc.url}"
      driverClass="${jdbc.driver}" password="${jdbc.password}" userId="${jdbc.username}" >

      <property name="nullCatalogMeansCurrent" value="true"/>
      </jdbcConnection>
      <javaTypeResolver>
      <property name="forceBigDecimals" value="false" />
      </javaTypeResolver>
      <javaModelGenerator targetPackage="com.lhd.entry" targetProject=".\src\main\java">
      <property name="enableSubPackages" value="true"/>
      <!-- 從數(shù)據(jù)庫返回的值被清理前后的空格 -->
      <property name="trimStrings" value="true" />
      </javaModelGenerator>
      <sqlMapGenerator targetPackage="mapping" targetProject=".\src\main\resources">
      <property name="enableSubPackages" value="true"/>
      </sqlMapGenerator>
      <javaClientGenerator type="XMLMAPPER" targetPackage="com.lhd.dao" targetProject=".\src\main\java">
      <property name="enableSubPackages" value="true"/>
      </javaClientGenerator>

      <!-- table指定每個表的生成策略 -->
      <table tableName="bus_customer" domainObjectName="BusCustomer"></table>
      <table tableName="bus_goods" domainObjectName="BusGoods"></table>

      <table tableName="bus_inport" domainObjectName="BusInport"></table>
      <table tableName="bus_outport" domainObjectName="BusOutport"></table>

      <table tableName="bus_provider" domainObjectName="BusProvider"></table>
      <table tableName="bus_sales" domainObjectName="BusSales"></table>

      <table tableName="bus_salesback" domainObjectName="BusSalesback"></table>
      <table tableName="sys_dept" domainObjectName="SysDept"></table>

      <table tableName="sys_log_login" domainObjectName="SysLogLogin"></table>
      <table tableName="sys_notice" domainObjectName="SysNotice"></table>

      <table tableName="sys_permission" domainObjectName="SysPermission"></table>
      <table tableName="sys_role" domainObjectName="SysRole"></table>

      <table tableName="sys_role_permission" domainObjectName="SysRolePermission"></table>
      <table tableName="sys_role_user" domainObjectName="SysRoleUser"></table>

      <table tableName="sys_user" domainObjectName="SysUser"></table>
      </context>
      </generatorConfiguration>

      在Run找到Run Configurations配置使用maven運(yùn)行的方式

      mybatis-generator:generate -e

      配置好后隨后到最右側(cè)點(diǎn)擊Maven圖標(biāo),查看你配置的項(xiàng)目Run Configurations找到下面的Mybatis-Generator直接點(diǎn)擊啟動,稍微等待一下就好了。



      posted @ 2021-01-19 11:36  RickL  閱讀(134)  評論(0)    收藏  舉報
      主站蜘蛛池模板: 日韩精品一区二区三区蜜臀| 亚洲另类激情专区小说婷婷久| av鲁丝一区鲁丝二区鲁丝三区 | 黔江区| 深夜放纵内射少妇| 一区二区中文字幕av| 亚洲天堂一区二区三区四区| 国产高清视频在线播放www色| 丁香婷婷综合激情五月色| 亚洲国产色婷婷久久99精品91| 亚洲中文字幕一二区日韩| 2020年最新国产精品正在播放| 国产喷水1区2区3区咪咪爱av| 日韩国产中文字幕精品| 福利一区二区在线视频| 91精品91久久久久久| 亚洲午夜爱爱香蕉片| 日本国产精品第一页久久| 欧美黑人巨大videos精品| 久久精品国产亚洲欧美| 无翼乌口工全彩无遮挡h全彩| 亚洲另类激情专区小说图片| 国产情侣激情在线对白| 灌南县| 国产在线乱子伦一区二区| 色综合亚洲一区二区小说| 国产四虎永久免费观看| 婷婷综合亚洲| 97精品久久九九中文字幕| 人人人澡人人肉久久精品| 在线亚洲午夜片av大片| 四虎成人精品永久免费av| 亚洲AV乱码毛片在线播放| 国产成人一区二区不卡| 久久精品国产一区二区蜜芽 | 国产亚洲999精品AA片在线爽| 免费人妻无码不卡中文18禁| 久草热在线视频免费播放| 国产精品大全中文字幕| 香蕉影院在线观看| 无码专区 人妻系列 在线|