idea中mybatis的mapper.xml警告解决方式

  • Post author:
  • Post category:其他




一、警告信息1

No data sources are configured to run this SQL and provide advanced code assistance. Disable this inspection via problem menu (Alt+Enter). less… (Ctrl+F1) Inspection info: Prompts one to create a data source if there is none.



二、警告样图

在这里插入图片描述



三、解决警告1

需要我们连接数据库

在这里插入图片描述

但是发现,还有这个错误信息:



四、警告信息2

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

Inspection info: Detects the best matching SQL dialect for files in dialect.



五、解决警告2

在这里插入图片描述

现在xml相关的sql语句已经变成浅绿色了.



六、警告信息3

XML tag has empty body less… (Ctrl+F1)

Inspection info: Reports empty tag body. The validation works in XML / JSP / JSPX / HTML/ XHTML file types.

在这里插入图片描述



七、解决告警3

将开合标签改成闭合标签即

在这里插入图片描述



八、解决重复代码警告

在这里插入图片描述



版权声明:本文为qq_37023928原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。