在Eclipse中使用MyBatisGenerator时,targetProject指向的位置只需要填写当前项目的名称即可,不需要写出相对路径。
例如:
<javaModelGenerator targetPackage="com.xxxxxx.project.system.notice.domain"
targetProject="current_project_name">
<property name="enableSubPackages" value="true"/>
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<sqlMapGenerator targetPackage="com.xxxxxx.project.system.notice.service"
targetProject="current_project_name">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<javaClientGenerator targetPackage="com.xxxxxx.project.system.notice.mapper"
targetProject="current_project_name" type="XMLMAPPER">
<property name="enableSubPackages" value="true"/>
</javaClientGenerator>