共计 1952 个字符,预计需要花费 5 分钟才能阅读完成。
download:大数据开发工程师
代码主动生成 mybatis-generator-maven-plugin 的 idea 主动生成插件
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.2</version>
<configuration>
<configurationFile>D:/GitFile/ka-product/ka-product-soa/src/main/resources/generatorConfig.xml</configurationFile>
<verbose>true</verbose>
<overwrite>true</overwrite>
</configuration>
</plugin>
generatorConfig.xml
<?xmlversion=”1.0″encoding=”UTF-8″?>
generatorConfigurationPUBLIC”-//mybatis.org//DTDMyBatisGeneratorConfiguration1.0//EN””http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd”>
<generatorConfiguration>
<classPathEntrylocation=”E:\repository\mysql\mysql-connector-java\5.1.30\mysql-connector-java-5.1.30.jar”/>
<contextid=”DB2Tables”targetRuntime=”MyBatis3″>
<commentGenerator>
<propertyname=”suppressDate”value=”true”/>
<propertyname=”suppressAllComments”value=”true”/>
</commentGenerator>
<jdbcConnectiondriverClass=”com.mysql.jdbc.Driver”connectionURL=”jdbc:mysql://192.168.147.35:3306/ka_product”userId=”root”password=”123456″/>
<javaTypeResolver>
<propertyname=”forceBigDecimals”value=”false”/>
</javaTypeResolver>
<javaModelGeneratortargetPackage=”site.muhu.cmp.ucenter.model”targetProject=”src/main/java”>
<propertyname=”enableSubPackages”value=”true”/>
<propertyname=”trimStrings”value=”true”/>
</javaModelGenerator>
<sqlMapGeneratortargetPackage=”mapping”targetProject=”src/main/resources”>
<propertyname=”enableSubPackages”value=”true”/>
</sqlMapGenerator>
<javaClientGeneratortype=”XMLMAPPER”targetPackage=”site.muhu.cmp.ucenter.mapper”targetProject=”src/main/java”>
<propertyname=”enableSubPackages”value=”true”/>
</javaClientGenerator>
<tabletableName=”b2b_sku_base”domainObjectName=”B2bSkuBase”enableCountByExample=”false”enableUpdateByExample=”false”enableDeleteByExample=”false”enableSelectByExample=”false”selectByExampleQueryId=”false”>
<generatedKeycolumn=”id”sqlStatement=”MySql”identity=”true”/>
</table>
</context>
</generatorConfiguration>