1. 程式人生 > >The method of type must override asuperclass? annotation:@Override

The method of type must override asuperclass? annotation:@Override

做ssm整合的時候出現問題提示:The method of type must override asuperclass? annotation:@Override的原因

查閱了一下資料,在jdk1.5要使用@Override 這個annotation 必須保證 被標註方法來源於class 而不是interface,

但我檢查過,發現自己的jdk確實是1.7版本啊。

最後發現,即使自己的jdk是1.7,還需要修改myeclipse裡面的編譯jdk版本,從5.0改成7.0,

修改路徑是,在myeclipse下:Windows--Preferences--Java--Compiler,在右邊的Compiler compliance level 修改版本為 7.0

,就可以了   

如果還有錯,請檢查:專案右鍵->build path->configure build path->java Compiler(左邊那排中) ->在右邊的Compiler compliance level 修改版本為 7.0

 



本人測試可用

本人菜鳥如有錯誤,希望大家指正

相關推薦

The method of type must override asuperclass? annotation@Override

做ssm整合的時候出現問題提示:The method of type must override asuperclass? annotation:@Override的原因 查閱了一下資料,在jd

he method of type must override a superclass method解決方式

工程匯入myeclipse時,出現問題提示:The method of type must override asuperclass? annotation:@Override的原因 查閱了一下資料,發現說在jdk1.5下要使用@Override 這個annotation 必須保證

eclipse 提示錯誤The method xxx of type must override a superclass method解決方式

java1.5中繼承介面是不需要@Override的,而在1.6中是需要新增@Override註解的,如果專案的編譯器是1.5版本的就可能報錯The method xxx of type must override a superclass method. 解決此問題的辦法是修改java編譯器的

The method ## of ## must override a superclass method

    當使用Eclipse匯入專案時,出現所有的介面實現類提示錯誤,錯誤的地方都是方法名上有標註@Override。這個原因是Java Compiler沒有設定好。 解決方法:點選Windows->Perferences->Java->Compiler的

idea 警告can not find the method of println

更新 找到了windows的解決方法,感覺比我寫的合理 下面2018.11.3兩篇文章一起食用效果更好 執行index.jsp 解決程式碼不智慧提示 多加一篇 idea匯入java專案之後是紅色J 話不多說直接上圖 轉載自——https://stackoverflow.c

mybatis異常The content of elements must consist of well-formed character data or markup的解決方法

今天做專案的時候,要加入選擇開始日期結束日期然後根據日期範圍刪選資料顯示出來的功能,於是我在mybatis的Mapper xml檔案中使用where語句寫了形如: select * from t_stuff where time < #{startTime} and time &g

thymeleaf 解析html時,出現 SAXParseException: The content of elements must consist of well-formed characte

00:46:32.733 [http-apr-8080-exec-7] ERROR o.t.templateparser.ErrorHandler - [THYMELEAF][http-apr-8080-exec-7] Fatal error during parsing

DapperThe member of type SeoTKD cannot be used as a parameter Value

這次看看新的異常: 這個的根本是因為模型欄位和資料庫不匹配導致的(好像之前是可以的) 資料庫中並沒有SeoInfo這個屬性(EF裡面導航屬性用的還是比較多的,這次換Dapper,這個肯定是少不了的,於是就折中了下,看看能不能讓Dapper忽略這個屬性) 解決方法:設定不可寫特性,writ

Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character

Cause:org.xml.sax.SAXParseException: The content of elements must consist of well-formed character d

Why does the method of Lagrange multipliers work for optimization in multivariable calculus?

今天看到拉格朗日乘子,kkt演算法的時候,突然想起來,為什麼拉格朗日演算法可以呢?直觀上怎麼理解呢? 發現還是quora上面的答案比較清晰直觀。 拉格朗日演算法其實相當於首先有了一個函式f的空間分佈,但是有了空間分佈還不夠,還需要有約束條件g。約束條件g

The method intercept(Invocation) of type PaginationInterceptor must override a superclass method

The method of type must override a superclass method解決方式 he method intercept(Invocation) of type PaginationInterceptor must override a superclass

@Override註解報錯,The method xxx of type xxx must override a superclass method

先交代環境:jdk1.8.0_65,eclipse版本: Oxygen Release (4.7.0) 今天用到@Override註解時,發現eclipse報錯The method xxx of ty

解決The content of element type "web-app" must match "(icon?display

內容 param match filter res ros welcome local page http://www.educity.cn/wenda/126463.html 解決:The content of element type "web-app" must ma

web.xml中<web-app>提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,

session span text .com ble splay 錯誤 esc gin 錯誤:配置web.xml時,出現紅色叉叉,提示 The content of element type "web-app" must match "(icon?,display-

strus2配置strus.xml問題-The content of element type "package" must match "(result-types?,interceptors?

ngs ppi 需要 ML 問題 所有 -i app exc 搭建strus2項目,在配置strus.xml時候碰到了這個問題: The content of element type "package" must match "(result-types?,interce

寫hibernate.cfg.xml時報錯The content of element type "property" must match "(meta*,(column|formula)*,type?)".

原配置檔案是這樣的 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "htt

web.xml中 web-app 報錯了--The content of element type "web-app" must match

web.xml中<web-app>報錯了--The content of element type "web-app" must match。真是活見鬼! 查完資料後發現,原來web-app_2_3.dtd規範有規定,裡面配置的內容要按照規定的順序來,如下:

No enclosing instance of type Face is accessible. Must qualify the allocation with an enclosing inst

剛才在練習內部類的時候遇到了這個報錯: No enclosing instance of type Face is accessible. Must qualify the allocation with an enclosing instance of type Face (e.g. x.ne

Java 報錯No enclosing instance of type E is accessible. Must qualify the allocation with an enclosing

解決方案:在Person內部類前面新增static,將內部類宣告為靜態內部類。 原因如下:在Java中 (1)類的靜態方法不能直接呼叫動態方法。 (2)類的靜態方法不能初始化內部類(包括該類的內部類,和其他檔案中的內部類)。 (3)類的靜態方法可以初始化其他類檔

The content of element type "web-app" must match "

報錯資訊: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,list