IDEA Mybatis 遇到的问题

Posted Mark_YPQ

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了IDEA Mybatis 遇到的问题相关的知识,希望对你有一定的参考价值。

##maven 插件不显示

插件

插件不要加在pluginManagement 下面 应该与pluginManagement 同级

    <plugin>
  <groupId>org.mybatis.generator</groupId>
  <artifactId>mybatis-generator-maven-plugin</artifactId>
  <version>1.3.2</version>
  <configuration>
    <verbose>true</verbose>
    <overwrite>true</overwrite>
  </configuration>
</plugin>

错误信息 元素类型为 “context” 的内容必须匹配 “(property*,plugin*,commentGenerator?,(connectionFactory|jdbcConnection),javaTypeResolver?,javaModelGenerator,sqlMapGenerator?,javaClientGenerator?,table+)”。

mybatis-generator解析xml配置文件是按照规定的格式来的。
“*” : 大于等于0次
“?” :0次或者1次
“+” : 大于等于1次

至少包含大于等于1次的元素
如果都加了还是报错
试着把 property ,plugin ,元素删除 ,我删除后错误消失

以上是关于IDEA Mybatis 遇到的问题的主要内容,如果未能解决你的问题,请参考以下文章