解決: SpringBoot報錯 context.config.ConfigFileApplicationListener.supportsSourceType(Ljava/lang/Class;)...


說明

首先說明一下,這可能是jar沖突原因,導致該原因可能是因為jar版本不一樣

啟動類啟動報錯:

Exception in thread "main" java.lang.AbstractMethodError: org.springframework.boot.context.config.ConfigFileApplicationListener.supportsSourceType(Ljava/lang/Class;)Z
測試方法運行報錯
org.springframework.core.annotation.AnnotationConfigurationException: Attribute 'proxyBeanMethods' in annotation [org.springframework.boot.autoconfigure.SpringBootApplication] is declared as an @AliasFor nonexistent attribute 'proxyBeanMethods' in annotation [org.springframework.context.annotation.Configuration].

image

解決

具體到我這個項目,是由於springboot中的spring版本和父項目中的spring版本不一致導致,最終排除掉springboot中的spring,或者重新建一個單純的springboot項目得以解決。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM