在使用mybatis-Generator生成xml时,不生成Example,在<table>标签中添加enableInsert="true" enableDeleteByPrimaryKey="true" enableSelectByPrimaryKey="true" enableUpdateByPrimaryKey="true"

enableCountByExample="false"  enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false",在生成xml文件时,应该有insert、insertSelective、selectByPrimaryKey、updateByPrimaryKeySelective、updateByPrimaryKey、deleteByPrimaryKey等方法,但是在生成的xml文件中只有insert、insertSelective,后来上网查了好多资料,发现很少描述这个问题的,看到其中有人说可能是jar版本不对,我用的是jdk1.8.0_73,mysql-connector-java-6.0.6..jar,mysql 5.7,后来改成mysql-connector-java-5.1.37.jar之后发现就可以了。

Mybatis Generator 不识别主键

Mybatis Generator 不识别主键

相关文章:

  • 2021-11-10
  • 2021-09-02
  • 2021-08-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-11
  • 2022-12-23
  • 2021-11-12
  • 2022-12-23
  • 2021-04-29
  • 2021-04-09
相关资源
相似解决方案