zoukankan      html  css  js  c++  java
  • 解决mybatis generator警告Cannot obtain primary key information from the database, generated objects may be incomplete

    使用 mybatis generator 生成pojo、dao、mapper时

    经常出现 Cannot obtain primary key information from the database, generated objects may be incomplete

    无法生成主键相关方法

    具体详细解决方案有人已经提出了,很长,https://blog.csdn.net/jpf254/article/details/79571396#%E6%9C%80%E7%BB%88%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88

    另一个详细解读,http://m.aspku.com/view-326284.html

    两个解决方案:

    1、MySQL数据驱动使用5.X版本

     2、这里记一下简单的解决方法,在数据库连接后面加上 nullCatalogMeansCurrent=true

    这里贴一下自己的数据库连接的写法,

    ?serverTimezone=UTC&zeroDateTimeBehavior=round&nullCatalogMeansCurrent=true

    本人用的是 mysql-connector-java 8
    所以加上第一个 serverTimezone,第二个 zeroDateTimeBehavior 是防止时间为null的解决
  • 相关阅读:
    The nineteenth day
    The eighteen day
    弱读下
    弱读上
    失爆 爆破音
    连读
    The seventeenth day
    The sixteenth day
    React 官方脚手架 create-react-app快速生成新项目
    pc端引入微信公众号文章
  • 原文地址:https://www.cnblogs.com/ihaokun/p/10037198.html
Copyright © 2011-2022 走看看