Mybatis Generator 不识别主键,无法生成selectByPrimaryKey方法
在jdbcConnection添加useInformationSchema为true
<jdbcConnection
driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://127.0.0.1:3306/orange?useUnicode=true&characterEncoding=utf-8&useSSL=false"
userId="root"
password="root">
<!--识别主键-->
<property name="useInformationSchema" value="true"/>
</jdbcConnection>
解决MybatisGenerator无法识别主键及生成selectByPrimaryKey方法的问题,通过在jdbcConnection中设置useInformationSchema为true来实现。

1万+

被折叠的 条评论
为什么被折叠?



