xml文件配置有问题?
<?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> <context id="DB2Tables" targetRuntime="MyBatis3"> <!--注释--> <commentGenerator> <!-- 是否去除自动生成的注释 true:是 : false:否 --> <property name="suppressAllComments" value="true"/> <property name="suppressDate" value="true"/> </commentGenerator> <!--数据库连接--> <jdbcConnection driverClass="com.mysql.cj.jdbc.Driver" connectionURL="jdbc:mysql://localhost:3306/command" userId="root" password=".wq891222"> </jdbcConnection>> <!--是否启用java.math.BigDecimal--> <!--<javaTypeResolver>--> <!--<property name="forceBigDecimals" value="false"/>--> <!--</javaTypeResolver>--> <!--生成DataObject类存放位置--> <javaModelGenerator targetPackage="top.laonie.command.dataobject" targetProject="src/main/java"> <!--是否对model添加构造函数--> <property name="constructorBased" value="false"/> <!--是否允许子包--> <property name="enableSubPackages" value="true"/> <!--建立的model对象是否不可变,也就是生成的model没有setter方法--> <property name="immutable" value="false"/> <property name="trimStrings" value="false"/> </javaModelGenerator> <!--生成映射文件存放位置--> <sqlMapGenerator targetPackage="mapping" targetProject="src/main/resources"> <property name="enableSubPackages" value="true"/> </sqlMapGenerator> <!--生成Mapper类存放位置--> <javaClientGenerator type="XMLMAPPER" targetPackage="top.laonie.command.dao" targetProject="src/main/java"> <property name="enableSubPackages" value="true"/> </javaClientGenerator> <!--生成与表对应的类名--> <table tableName="user_info" domainObjectName="UserDO" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/> <table tableName="user_password" domainObjectName="UserPasswordDO" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false"/> </context> </generatorConfiguration>
出了这个错误提示,究竟是怎么回事呢
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.7:generate (default-cli) on project command: XML Parser Error on line 53: 元素类型为 "context" 的内容必须匹配 "(property*,plugin*,commentGenerator?,(connectionFactory|jdbcConnection),javaTypeResolver?,javaModelGenerator,sqlMapGenerator?,javaClientGenerator?,table+)"。 -> [Help 1]