idea 常见报错问题 记录

class never used  从未使用过的类 出现下划线

ctrl+alt+s 

setting ---editor-inspections--unused declaration

method is never used  接口提示报错信息

 

Typo: In word 拼写检查

xml 中No data sources configured 和  SQL dialect detection

xml背景色去掉

 

下面是转载的

  • <statement> or DELIMITER expected, got 'id'

    • 这个错误是发生在MyBatis的Mapper的XML文件的sql节点上,第一个字段是什么错误中最后一个单引号内部就是什么,解决方案,干掉方框中的sql|即可,点击这里查看问题答案来源
      问题1图解
  • Unable to resolve table '<table-name>'


    问题2
    • 解决方案:勾掉Unresolved refereence


      问题2图解
  • Result type doesn't match for xxx


    问题3
    • 解决方案:勾掉Mapper Method inspection


      问题3图解
  • '(', ':=', '=' or '[' expected, got 'id'


    问题4
    • 解决方案:去掉 where之前的,即可
  • Usage of API documented as @since 1.6+


    问题5
    • 解决:


      问题5图解
  • Class '<class-name>' is never used

    • 使用idea的时候发现很多多余的警告,可能是在Eclipse中习惯了吧,反而觉得Idea管的有点宽,一个类不用报警告,一个方法不用会报警告,但是我觉得这点Eclipse处理的还是比较得当的,public的可能是util中的,难不成现在删了?后面需要再加???


      问题6
    • 解决:


      问题6图解
  • Variable '<var-name>' initializer 'null' is redundant


    问题7
    • 解决(光标放在null上,然后Alt+Enter就可以弹出提示):


原文地址:https://www.cnblogs.com/qin-up/p/10100135.html