SQL dialect is not configured

问题描述

idea    mybatis     Oracle

mapper层的sql语句提示“SQL dialect is not configured”(SQL方言未配置)

SQL dialect is not configured

原因分析

GroupSetVersionCompare类只是一个pojo,没有@Table等注解,且数据库中也没有对应的表。

解决方法

方法一

在mapper文件的浅黄色区域Alt+Enter,出现提示框

SQL dialect is not configured

点击Change dialect to...

SQL dialect is not configured

点击Generic SQL

SQL dialect is not configured

选择Oracle,确定即可。之后idea会按Oracle数据的语法规则对sql语句进行检查。而且,此时mapper层的sql语句背景由浅黄变为绿色。

方法二

参见

https://blog.csdn.net/q957967519/article/details/88061945

参考文章

https://blog.csdn.net/q957967519/article/details/88061945