1、错误描述
Unexpected error while running MyBatis Generator.
Path for project must have only one segment.
2、错误原因
项目目标配置出错
<javaModelGenerator targetPackage="com.you.weixin.model"
targetProject="../src/main/java">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
3、解决办法
<javaModelGenerator targetPackage="com.you.weixin.model"
targetProject="WXOCP">
<property name="enableSubPackages" value="true" />
<property name="trimStrings" value="true" />
</javaModelGenerator>
将targetProject修改为项目名称