MyBatis Generator Configuration File文件配置
<generatorConfiguration>
<!-- 配置驱动 -- 填写mysql的connerctor架包>
<classPathEntry location="E:\Java_Tools\programmingRelated\SoftwareInstallation\mysql-connector-java-5.1.21.jar" />
<context id="context1">
<commentGenerator>
<property name="suppressDate" value="true" />
<!-- 是否去除自动生成的注释 true:是 : false:否 -->
<property name="suppressAllComments" value="true" />
</commentGenerator>
<jdbcConnection driverClass="com.mysql.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/mybatis" userId="root" password="root" />
<!-- 1、领域模型 -- tagetPackage:生成包名;targetProject:生成项目对象名>
<javaModelGenerator targetPackage="com.mybatis.system.model" targetProject="MyMybatis-ORM" />
<!-- 2、xml文件 -->
<sqlMapGenerator targetPackage="com.mybatis.system.mapper" targetProject="MyMybatis-ORM" />
<!-- 3、接口 -->
<javaClientGenerator targetPackage="com.mybatis.system.dao" targetProject="MyMybatis-ORM" type="XMLMAPPER" />
<table tableName="sys_user" domainObjectName="User" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>
<table tableName="sys_menu" domainObjectName="Menu" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>
<table tableName="sys_role" domainObjectName="Role" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>
<table tableName="sys_role_menu" domainObjectName="RoleMenu" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>
<table tableName="sys_user_role" domainObjectName="UserRole" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false"
selectByExampleQueryId="false"></table>
</context>
</generatorConfiguration>