mybatis-generater-plugins


License

License

Categories

Categories

MyBatis Data ORM
GroupId

GroupId

com.github.liyanpro
ArtifactId

ArtifactId

mybatis-generater-plugins
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

jar
Description

Description

mybatis-generater-plugins
mybatis-generater-plugins
Project URL

Project URL

https://github.com/liyanpro/mybatis-generater-plugins
Source Code Management

Source Code Management

https://github.com/liyanpro/mybatis-generater-plugins

Download mybatis-generater-plugins

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.liyanpro/mybatis-generater-plugins/ -->
<dependency>
    <groupId>com.github.liyanpro</groupId>
    <artifactId>mybatis-generater-plugins</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.liyanpro/mybatis-generater-plugins/
implementation 'com.github.liyanpro:mybatis-generater-plugins:1.0.1'
// https://jarcasting.com/artifacts/com.github.liyanpro/mybatis-generater-plugins/
implementation ("com.github.liyanpro:mybatis-generater-plugins:1.0.1")
'com.github.liyanpro:mybatis-generater-plugins:jar:1.0.1'
<dependency org="com.github.liyanpro" name="mybatis-generater-plugins" rev="1.0.1">
  <artifact name="mybatis-generater-plugins" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.liyanpro', module='mybatis-generater-plugins', version='1.0.1')
)
libraryDependencies += "com.github.liyanpro" % "mybatis-generater-plugins" % "1.0.1"
[com.github.liyanpro/mybatis-generater-plugins "1.0.1"]

Dependencies

compile (4)

Group / Artifact Type Version
org.mybatis.generator : mybatis-generator-core jar 1.3.6
org.slf4j : slf4j-api jar 1.7.22
org.freemarker : freemarker jar 2.3.26-incubating
dom4j : dom4j jar 1.6.1

Project Modules

There are no modules declared in this project.

mybatis-generater-plugins 自动生成sql文件

###项目中引用

添加依赖

    <dependency>
      <groupId>com.github.liyanpro</groupId>
      <artifactId>mybatis-generater-plugins</artifactId>
      <version>1.0.1</version>
    </dependency>

添加config.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>
    	<classPathEntry
    			location="/Users/liyan/maven-3.2.5/maven-dependcies/mysql/mysql-connector-java/5.1.33/mysql-connector-java-5.1.33.jar"/>
    	<context id="context1" targetRuntime="MyBatis3">
    		<plugin type="cloud.liyan.mybatis.plugins.MySQLLimitPlugin"></plugin>
    
    		<jdbcConnection driverClass="com.mysql.jdbc.Driver"
    						connectionURL="jdbc:mysql://localhost:3306/liyan_database?useUnicode=true&amp;characterEncoding=UTF-8"
    						userId="liyan" password="****"/>
    		<!-- model路径和项目中java代码路径 -->				
    		<javaModelGenerator targetPackage="../model"
    							targetProject="../src/main/java/"/>
    		<!-- 要生成的mapper.xml文件路径和项目中mapper接口路径 -->						
    		<sqlMapGenerator targetPackage="mappers"
    						 targetProject="../src/main/resources"/>
    		<javaClientGenerator targetPackage="../dao"
    							 targetProject="../src/main/java/"
    							 type="XMLMAPPER"/>
    
    		<table schema="dataBase" tableName="tableName"/>
    
    	</context>
    </generatorConfiguration>
    
    <!--eclipse中执行 -->
    <!-- 选择pom.xml文件,击右键先择Run AS——>Maven Build… ——>在Goals框中输入:mybatis-generator:generate -->
    <!--idea中执行 -->
    <!-- edit configrations,添加 Maven,在Command-line 中输入:mybatis-generator:generate -e -->

Versions

Version
1.0.1
1.0.0