解决: 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