我使用ibator eclipse插件1.2.1。我的RDBMS是MySQL 5.1。我有一個ibator配置文件,如下圖所示:ibatis ibator Java代碼生成問題
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE ibatorConfiguration PUBLIC "-//Apache Software Foundation//DTD Apache iBATIS Ibator Configuration 1.0//EN" "http://ibatis.apache.org/dtd/ibator-config_1_0.dtd" >
<ibatorConfiguration>
<classPathEntry location="/mysql-connector-java-5.1.7-bin.jar"/>
<ibatorContext defaultModelType="flat" id="context1" targetRuntime="Ibatis2Java5">
<jdbcConnection connectionURL="jdbc:mysql://localhost:3306/database" driverClass="com.mysql.jdbc.Driver" password="pass" userId="root"/>
<javaModelGenerator targetPackage="com.xxx.core.domain" targetProject="Myproject">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<sqlMapGenerator targetPackage="com.xxx.core.dao.ibatis.maps" targetProject="Myproject">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<daoGenerator targetPackage="com.xxx.core.dao" targetProject="Myproject" type="SPRING">
<property name="enableSubPackages" value="true"/>
<property name="methodNameCalculator" value="extended"/>
</daoGenerator>
<table tableName="account" domainObjectName="Account"/>
<table tableName="personel" domainObjectName="Personel"/>
</ibatorContext>
</ibatorConfiguration>
生成的所有代碼都在com.xxx.core.domain,但我想在COM com.xxx.core.domain.account和企業人事類賬戶類。 xxx.core.domain.personel。我怎麼能這樣做? (在ibator中,我們可以在table標籤上放置schema =「myschema」,但MySQL不支持schema)謝謝。