No data source are configured to run this SQL and provide advanced code assistance.

No data source are configured to run this SQL and provide advanced code assistance.

码农世界 2024-05-29 后端 74 次浏览 0个评论

在springboot项目中在resource文件夹中编写database.sql时,在显示框顶部显示如下提示:

No data source are configured to run this SQL and provide advanced code assistance.

SQL dialect is not configured. MariaDB,MySQL match best.

具体如截图所示:

No data source are configured to run this SQL and provide advanced code assistance.

解决办法:

一、先解决第二个,也就是“SQL dialect is not configured. MariaDB,MySQL match best.”这个问题:

1、进入settings—>Editor—>Inspections

2、在搜索栏中输入sql,找到:SQL dialect detection

3、去掉勾选,点击Apply,点击OK

4、这时会发现第二条提示(SQL dialect is not configured. MariaDB,MySQL match best.)已经不显示了

No data source are configured to run this SQL and provide advanced code assistance.

二、解决第一个,这里以连接MySQL为例

1、点击idea后边菜单栏中的Database

2、在弹出的页面中点击“+”—>Data Source—>MySQL

3、在弹出的页面中不用填写任何信息,直接点击Apply—>OK即可,原因:mysql的连接application.properties或application.yml中配置,这里不填写不影响项目的启动

No data source are configured to run this SQL and provide advanced code assistance.

No data source are configured to run this SQL and provide advanced code assistance.

转载请注明来自码农世界,本文标题:《No data source are configured to run this SQL and provide advanced code assistance.》

百度分享代码,如果开启HTTPS请参考李洋个人博客
每一天,每一秒,你所做的决定都会改变你的人生!

发表评论

快捷回复:

评论列表 (暂无评论,74人围观)参与讨论

还没有评论,来说两句吧...

Top