標籤:預設 檔案 mybatis code microsoft sqlserver jdbc gen app
Mybatis Generator for SQL Server
<?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> <!-- 制定mysql的驅動包的路徑 千萬別放中文路徑下 --> <classPathEntry location="D:\Jr\sqljdbc4.jar" /> <!-- 配置資料來源和產生的程式碼所存放的位置 --> <context id="context1"> <commentGenerator> <!-- 去除自動產生的注釋 --> <property name="suppressAllComments" value="true" /> </commentGenerator> <jdbcConnection driverClass="com.microsoft.sqlserver.jdbc.SQLServerDriver" connectionURL="jdbc:sqlserver://127.0.0.1:1433;databaseName=se; catalogName=se" userId="user" password="pass"> </jdbcConnection> <!-- 所產生的實體類的位置預設資源套件src --> <javaModelGenerator targetPackage="com.se.model" targetProject="T" /> <!-- 所產生的sqlMap的影射檔案的位置,預設資源套件src --> <sqlMapGenerator targetPackage="com.se.mapper" targetProject="T" /> <!-- 產生mapxml對應的client,也就是dao --> <javaClientGenerator targetPackage="com.se.dao" targetProject="T" type="XMLMAPPER" /> <!--為哪些表產生代碼 tableName:表名 schema:不用填寫,其餘屬性是禁用例子查詢的產生 --> <table tableName="Tbl" domainObjectName="Tbl" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" > </table> </context></generatorConfiguration>
Mybatis Generator for SQL Server