zoukankan      html  css  js  c++  java
  • idea逆向工程配置

    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>    <context id="test" targetRuntime="MyBatis3">
            <commentGenerator>            <!-- 是否去除自动生成的注释 true:是 : false:否 -->            <property name="suppressAllComments" value="true" />        </commentGenerator>        <!--数据库链接URL,用户名、密码 -->        <jdbcConnection driverClass="com.mysql.jdbc.Driver"                        connectionURL="jdbc:mysql://localhost:3306/crmpro" userId="root"                        password="root">        </jdbcConnection>        <javaTypeResolver>            <property name="forceBigDecimals" value="false" />        </javaTypeResolver>        <!-- 生成模型的包名和位置 -->        <javaModelGenerator targetPackage="bean" targetProject="target">            <property name="enableSubPackages" value="true" />            <property name="trimStrings" value="true" />        </javaModelGenerator>        <!-- 生成映射文件的包名和位置 -->        <sqlMapGenerator targetPackage="mapper"  targetProject="target">            <property name="enableSubPackages" value="true" />        </sqlMapGenerator>        <!-- 生成DAO的包名和位置 -->        <javaClientGenerator type="XMLMAPPER"  targetPackage="mapper" implementationPackage="cn.blog.service.impl"                             targetProject="target">            <property name="enableSubPackages" value="true" />        </javaClientGenerator>


            <!-- 要生成哪些表 -->        <table tableName="analysis" domainObjectName="Analysis"></table>        <table tableName="archives" domainObjectName="Archives"></table>        <table tableName="attachment" domainObjectName="Attachment"></table>        <table tableName="baoxiao" domainObjectName="BaoXiao"></table>        <table tableName="customer" domainObjectName="Customer"></table>        <table tableName="dept" domainObjectName="Dept"></table>        <table tableName="email" domainObjectName="Email"></table>        <table tableName="forumpost" domainObjectName="ForumPost"></table>        <table tableName="function" domainObjectName="Function"></table>        <table tableName="level" domainObjectName="Level"></table>        <table tableName="module" domainObjectName="Model"></table>
            <table tableName="msg" domainObjectName="Msg"></table>        <table tableName="notice" domainObjectName="Notice"></table>        <table tableName="position" domainObjectName="Position"></table>        <table tableName="role" domainObjectName="Role"></table>        <table tableName="sources" domainObjectName="Sources"></table>        <table tableName="task" domainObjectName="Task"></table>        <table tableName="project" domainObjectName="Project"></table>        <table tableName="employee" domainObjectName="Employee"></table>
        </context></generatorConfiguration>

    插件:
            <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>5.1.37</version>            </dependency>          </dependencies>          <configuration>            <!--配置文件的路径-->            <configurationFile>src/main/resources/generatorConfig.xml</configurationFile>            <overwrite>true</overwrite>          </configuration>        </plugin>      </plugins>

  • 相关阅读:
    Android studio初次安装启动时弹出unable to access android sdk add-on list提示的解决方法
    SQL Server(MSSQLSERVER) 请求失败或服务未及时响应,有关详细信息,请参见事件日志或其他的适用的错误日志。
    Docker启动时提示Get Permission Denied while trying to connect解决方法
    Docker版本与centos和ubuntu环境下docker安装介绍
    菜鸟宝典之Windows Server 2012 R2上PHP、MySQL环境搭建
    Java入门指南-04 顺序、分支、循环
    Java入门指南-03 操作符与表达式
    Java入门指南-02 变量
    Java入门指南-01 基本概要说明
    JavaWeb零基础入门-02 开发环境安装
  • 原文地址:https://www.cnblogs.com/wycBolg/p/11947097.html
Copyright © 2011-2022 走看看