34,576
社区成员
发帖
与我相关
我的任务
分享
<generatorConfiguration>
<!-- <properties resource="conn.properties" /> -->
<classPathEntry location="D:\MyEclipseWorking\Scm\WebRoot\WEB-INF\lib\sqljdbc42.jar" />
<!-- 指定运行环境是mybatis3的版本 -->
<context id="DB2Tables" targetRuntime="MyBatis3">
<commentGenerator>
<!-- 是否取消注释 -->
<property name="suppressAllComments" value="true" />
<!-- 是否生成注释代时间戳 -->
<property name="suppressDate" value="true" />
</commentGenerator>
<!-- jdbc 连接信息 -->
<jdbcConnection driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver"
connectionURL="jdbc:sqlserver://127.0.0.1:1433;databaseName=Scm;"
userId="sa" password="root">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- targetPackage指定模型在生成在哪个包 ,targetProject指定项目的src, -->
<javaModelGenerator targetPackage="cn.lin.test2.entity" targetProject="src">
<!-- 去除字段前后空格 -->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- 指定dao类生成在哪个包 -->
<sqlMapGenerator targetPackage="cn.lin.test2.mapper" targetProject="src">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<javaClientGenerator targetPackage="cn.lin.test2.dao" type="XMLMAPPER" targetProject="src" />
<table tableName="Dept" domainObjectName="Dept"
enableCountByExample="false"
enableUpdateByExample="false"
enableDeleteByExample="false"
enableSelectByExample="false"
selectByExampleQueryId="false"/>
</context>
</generatorConfiguration>