idea的mybatis的xml文件总是报警告SQL dialect is not configured

警告:

No data sources are configured to run this SQL and provide advanced code assistance. Disable this inspection via problem menu (Alt+Enter). more... (Ctrl+F1)

SQL dialect is not configured. PostgreSQL, SQL Server match best. more... (Ctrl+F1)

这是两个警告,首先我们解决一个警告:

File -> setting 搜索inspections,再搜索sql,找到SQL dialect detection去掉勾,然后apply ->ok

这个时候我们发现只有一个警告了

现在我们解决最后一个警告:,点开右上角的Database,我这里用的是mysql示例,这里不用填写mysql的数据库,用户名,密码什么的,直接apply,然后ok,并不影响启动项目时的mysql连接,mysql的连接该在application.properties或application.yml中怎么配就怎么配:

这样就没有警告了:

把项目关掉再开启也还是没有警告了,写完收工

发布了87 篇原创文章 · 获赞 186 · 访问量 64万+

猜你喜欢

转载自blog.csdn.net/qq_33326449/article/details/104307205