mapper文件提示:No data sources are configured to run this sql
-
idea的mapper.xml文件提示:
“No data sources are configured to run this sql and provide advanced code assistance.Disable this inspection via problem menu”
意思是:没有配置数据源运行此 sql 并提供”编写sql提示”。通过问题菜单禁用此检查。 解决办法:使用idea连接数据库即可
如果找不到右侧的工具栏,请点击File–>setting–>appearance
连接了数据库之后,mapper文件的背景色变成了浅绿色,并且编写sql的时候会有代码提示和错误提示,非常方便