Mybatis Generator 不识别主键,无法生成selectByPrimaryKey方法

 

<jdbcConnection 
            driverClass="com.mysql.cj.jdbc.Driver"
            connectionURL="jdbc:mysql://127.0.0.1:3306/orange?useUnicode=true&amp;characterEncoding=utf-8&amp;useSSL=false"
            userId="root"
            password="root">
            <!--识别主键-->
            <property name="useInformationSchema" value="true"/>
 </jdbcConnection>

配置文件加

 

在jdbcConnection添加useInformationSchema为true

https://blog.csdn.net/y_1111/article/details/87092706

posted @ 2020-04-15 14:39  M号开发者  阅读(960)  评论(0编辑  收藏  举报