Rumah > Soal Jawab > teks badan
PHPz2017-04-18 09:48:16
Biasanya apabila saya menghadapi masalah seperti ini, ini kerana laluan yang ditetapkan adalah salah dan penjanaan berada di tempat lain. Anda juga boleh menyemak sama ada konsol masa jalan mencetak fail .. ke mana
迷茫2017-04-18 09:48:16
Pergi terus ke kod, ini ialah fail konfigurasi, nyatakan laluan penjanaan anda. Kemudian dalam direktori, laksanakan arahan: mvn mybatis-generator:generate
<?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>
<!-- oracle-connector的位置 -->
<classPathEntry
location="D:/myproject/.m2/mysql/mysql-connector-java/5.1.21/mysql-connector-java-5.1.21.jar" />
<!-- 配置一个代码生成操作,如果生成的目录或是数据库不一样,只需要参考增加一个context节点即可 -->
<context id="rock_auth_app_sys" targetRuntime="MyBatis3">
<property name="suppressAllComments" value="true" />
<property name="useActualColumnNames" value="false" />
<!-- 配置插件 -->
<plugin
type="com.rock.dal.mybatis.MysqlPaginationPlugin" />
<jdbcConnection driverClass="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://10.101.234.27:3308/idcm" userId="数据库用户名"
password="数据库密码">
</jdbcConnection>
<javaTypeResolver>
<property name="forceBigDecimals" value="false" />
</javaTypeResolver>
<!-- mvn mybatis-generator:generate -->
<!-- 配置model生成位置 -->
<javaModelGenerator targetPackage="com.alibaba.tboss.dal.mysql.workOrder"
targetProject="src/main/java">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- 配置sqlmap生成位置 -->
<sqlMapGenerator targetPackage="com.alibaba.tboss.dal.mysql.workOrder.mapper"
targetProject="src/main/resources">
<property name="enableSubPackages" value="true" />
</sqlMapGenerator>
<!-- 配置mapper接口生成位置 -->
<javaClientGenerator type="XMLMAPPER"
targetPackage="com.alibaba.tboss.dal.mysql.workOrder.mapper" targetProject="src/main/java">
<property name="enableSubPackages" value="true" />
</javaClientGenerator>
<!-- mvn mybatis-generator:generate -->
<table schema="idcm" tableName="idc_logistics_assign_rules" domainObjectName="LogisticsAssignRules"
enableUpdateByExample="false" enableDeleteByExample="false">
</table>
</context>
</generatorConfiguration>