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=\"jtds-1.2.2.jar\" />
-
-
<context id=\"Mssql2Tables\" targetRuntime=\"MyBatis3\">
-
<commentGenerator>
-
<property name=\"suppressDate\" value=\"true\"/>
-
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
-
<property name=\"suppressAllComments\" value=\"true\"/>
-
</commentGenerator>
-
<jdbcConnection driverClass=\"net.sourceforge.jtds.jdbc.Driver\"
-
connectionURL=\"jdbc:jtds:sqlserver://127.0.0.1:1433/tax\"
-
userId=\"tax\"
-
password=\"tax123\">
-
</jdbcConnection>
-
-
-
-
<javaTypeResolver >
-
<property name=\"forceBigDecimals\" value=\"false\" />
-
</javaTypeResolver>
-
-
<javaModelGenerator targetPackage=\"com.tax.model\" targetProject=\"src\">
-
<property name=\"enableSubPackages\" value=\"true\" />
-
<property name=\"trimStrings\" value=\"true\" />
-
</javaModelGenerator>
-
-
<sqlMapGenerator targetPackage=\"com.tax.mapper\" targetProject=\"src\">
-
<property name=\"enableSubPackages\" value=\"true\" />
-
</sqlMapGenerator>
-
-
<javaClientGenerator type=\"XMLMAPPER\" targetPackage=\"com.tax.dao\" targetProject=\"src\">
-
<property name=\"enableSubPackages\" value=\"true\" />
-
</javaClientGenerator>
-
-
<table tableName=\"charge_formula\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\" enableInsertSelective=\"false\">
-
</table>
-
<table tableName=\"charge_formula_history\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"charge_plan\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"charge_type\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"charge_value\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"charge_value_history\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"company_charge\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"company_order\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"company_order_audit\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
-
<table tableName=\"device\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"org_type\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"project_split\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
<table tableName=\"sale_charge\" enableCountByExample=\"false\" enableUpdateByExample=\"false\" enableDeleteByExample=\"false\" enableSelectByExample=\"false\" selectByExampleQueryId=\"false\">
-
</table>
-
-
-
</context>
-
</generatorConfiguration>
调用生成代码命令
java -jar mybatis-generator-core-1.3.2.jar -configfile config.xml -overwrite
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1701667/viewspace-1229940/
,如需转载,请注明出处,否则将追究法律责任。