67,513
社区成员
发帖
与我相关
我的任务
分享
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project springboot: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Cannot resolve classpath entry: D:\src\main\java -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project springboot: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Cannot resolve classpath entry: D:\src\main\java
<?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>
<properties resource="application.properties"></properties>
<!-- 数据库JDBC驱动jar包 -->
<classPathEntry location="C:\Program Files (x86)\Java\mysql-connector-java-5.1.26-bin.jar"/>
<!-- 指定运行环境是mybatis3的版本 -->
<context id="testTables" targetRuntime="MyBatis3">
<commentGenerator>
<!-- 是否取消注释 -->
<property name="suppressAllComments" value="true" />
<!-- 是否生成注释代时间戳 -->
<property name="suppressDate" value="false" />
</commentGenerator>
<!-- jdbc 连接信息 -->
<jdbcConnection driverClass="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost:3306/ugg001"
userId="root"
password="root">
</jdbcConnection>
<!-- javabean配置信息 targetProject:自动生成实体类对象的位置-->
<javaModelGenerator targetPackage="com.example.entity" targetProject="\src\main\java">
<!-- 去除字段前后空格 -->
<property name="trimStrings" value="true" />
</javaModelGenerator>
<!-- 指定Mapper文件生成在哪个包 -->
<sqlMapGenerator targetPackage="mybatis" targetProject="src/main/resources" />
<!-- dao接口放在哪里 -->
<javaClientGenerator type="XMLMAPPER" targetPackage="com.example.mapper" targetProject="src/main/java" />
<!-- 配置表对应的javabean信息 -->
<table tableName="u_user" domainObjectName="UUser"></table>
<table tableName="u_user_role" domainObjectName="UserRole"></table>
<table tableName="u_permission" domainObjectName="Permission"></table>
<table tableName="u_role" domainObjectName="URole"></table>
<table tableName="u_role_permission" domainObjectName="RolePermission"></table>
</context>
</generatorConfiguration>