解决: 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项目得以解决。

posted @ 2022-03-08 21:01  simplec  阅读(2389)  评论(0)    收藏  举报