为了账号安全,请及时绑定邮箱和手机立即绑定

mybatis逆向工程配置文件报错是为啥

mybatis逆向工程配置文件报错是为啥

噗通_ 2018-11-05 20:49:23
<generatorConfiguration>     <context id="generateTables" targetRuntime="MyBatis3">         <!-- 此处是将 Example 改名为 Criteria -->         <plugin type="org.mybatis.generator.plugins.RenameExampleClassPlugin">             <property name="searchString" value="Example" />             <property name="replaceString" value="Criteria" />         </plugin>         <plugin type="org.mybatis.generator.plugins.SerializablePlugin" />         <commentGenerator>             <!-- 是否去除自动生成的注释 true:是 : false:否 -->             <property name="suppressAllComments" value="true" />             <property name="suppressDate" value="true" />         </commentGenerator>         <!--数据库连接的信息:驱动类、连接地址、用户名、密码 -->         <jdbcConnection driverClass="com.mysql.jdbc.Driver"                         connectionURL="jdbc:mysql://localhost:3306/mysql" userId="root"                         password="root">         </jdbcConnection>         <!-- <jdbcConnection driverClass="oracle.jdbc.OracleDriver" connectionURL="jdbc:oracle:thin:@127.0.0.1:1521:yycg"             userId="yycg" password="yycg"> </jdbcConnection> -->         <!-- 默认false,把JDBC DECIMAL 和 NUMERIC 类型解析为 Integer,为 true时把JDBC DECIMAL             和 NUMERIC 类型解析为java.math.BigDecimal -->         <javaTypeResolver>             <property name="forceBigDecimals" value="false" />         </javaTypeResolver>         <!-- targetProject:生成PO类的位置 -->         <javaModelGenerator targetPackage="com.zw.dao"                             targetProject=".\src\main\java">             <!-- enableSubPackages:是否让schema作为包的后缀 -->             <property name="enableSubPackages" value="false" />             <!-- 从数据库返回的值被清理前后的空格 -->             <property name="trimStrings" value="true" />         </javaModelGenerator>         <!-- targetProject:mapper映射文件生成的位置 -->         <sqlMapGenerator targetPackage="com.zw.mapper"                          targetProject=".\src\main\java">             <!-- enableSubPackages:是否让schema作为包的后缀 -->             <property name="enableSubPackages" value="false" />         </sqlMapGenerator>         <!-- targetPackage:mapper接口生成的位置 -->         <javaClientGenerator type="XMLMAPPER"                              targetPackage="com.zby.mapper" targetProject=".\src\main\java">             <!-- enableSubPackages:是否让schema作为包的后缀 -->             <property name="enableSubPackages" value="false" />         </javaClientGenerator>         <!-- 指定数据库表 -->         <table schema="general" tableName="tb_item" domainObjectName="Item"                enableCountByExample="false" enableUpdateByExample="false"                enableDeleteByExample="false" enableSelectByExample="true"                selectByExampleQueryId="false">             <property name="useActualColumnNames" value="false" />         </table>     </context> </generatorConfiguration>
查看完整描述

4 回答

?
qq_雁过留声_2

TA贡献21条经验 获得超47个赞

你弄错了

查看完整回答
反对 回复 2018-12-13
?
睡到自然醒ldr

TA贡献4条经验 获得超0个赞

generator插件是以插件形式导入.
查看完整回答
反对 回复 2018-11-19
  • 4 回答
  • 0 关注
  • 1753 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信