IntelliJ IDEA 下的SQL映射文件(mapper.xml)会自动添加屎黄色背景,看上去非常 ugly,本文将给出去除背景色的方法

屎黄色背景
IntelliJ IDEA 下的 SQL 的xml映射文件,会自动添加下图所示的屎黄色背景,不仅别扭还丑……

原因
打开 seeting,找到 editor 下的 inspections ,会看到 SQL 下的 "no data sources configured" 或 "sql dialect detection" 为被勾选状态,如下图所示

解决方案
将上文的 "no data sources configured" 和 "sql dialect detection" 均取消勾选,如下图所示

检查无误,确认设置后,可以看到屎黄色背景已经去掉

网友评论