1. 程式人生 > >SprinfBoot報警告WARNING: An illegal reflective access operation has occurred

SprinfBoot報警告WARNING: An illegal reflective access operation has occurred

警告如圖所示,該警告是因為jdk版本太高(我用的是10.0,據說9.0的也會這樣),具體的原理還沒有研究,它不影響專案的正常執行,但是看著很糟心有木有~~~~

解決方案是把專案jdk降低到1.8及以下,建議1.8。

操作步驟:

快捷鍵Ctrl+Alt+Shift+S 進入專案結構設定如圖

修改為1.8  然後確認即可。

如果上述方法還沒有解決,那請在上圖中開啟Modules,然後檢查一下每一個模組的Dependencies

保證每一個模組的版本都在1.8及以下。  然後確認!

到現在,問題應該就解決了。

  如果問題解決,留個評論喲。謝謝  

以下內容僅用於搜尋引擎定位本文章,不用看

 WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.springframework.cglib.core.ReflectUtils$1 (file:/C:/Users/zhangxianwen/.m2/repository/org/springframework/spring-core/5.0.7.RELEASE/spring-core-5.0.7.RELEASE.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) WARNING: Please consider reporting this to the maintainers of org.springframework.cglib.core.ReflectUtils$1 WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release