将mybatis生成器用于db表的类,我发现有时它会在生成的.java文件,* Example.java和* Mapper.java中的函数签名中引入换行符。
有时可以避免这种情况,因为有时检查svn修改很困难吗?
我使用了以下配置:
<?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="myFolder/myDriver.jar"/>
<context id="MyDB" targetRuntime="MyBatis3">
<commentGenerator>
<property name="suppressDate" value="true" />
</commentGenerator>
<jdbcConnection driverClass="myDriver" connectionURL="myUrl" userId="myUserID" password="myPwd" />
<javaModelGenerator targetPackage="myPackage" targetProject="myProject" >
<property name="enableSubPackages" value="false" />
</javaModelGenerator>
<sqlMapGenerator targetPackage="myMapper" targetProject="myProject">
<property name="enableSubPackages" value="false" />
</sqlMapGenerator>
<javaClientGenerator targetPackage="myMapper" targetProject="myProject" type="XMLMAPPER">
<property name="enableSubPackages" value="false" />
</javaClientGenerator>
<table schema="MY_SCHEMA" tableName="TABLE_TO_GENERATE">
</table>
</context>
</generatorConfiguration>