NoClassDefFoundError:ConfigurationPropertySources [英] NoClassDefFoundError : ConfigurationPropertySources
问题描述
从昨天开始,在全新安装后,我们的Spring Boot项目出现问题,而没有更改Maven文件,lib或其他内容的配置.
Since yesterday we have a problem on our spring boot project after clean install without change nothing of configuration of the maven files, libs or something else.
我们确实尝试将SpringFrameWork和Spring引导的pom版本更新为1.5.4.Release.
We did try to update version of pom's of SpringFrameWork and Spring boot to 1.5.4.Release.
显示的错误是:
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/source/ConfigurationPropertySources
at org.springframework.cloud.client.HostInfoEnvironmentPostProcessor.getFirstNonLoopbackHostInfo(HostInfoEnvironmentPostProcessor.java:46)
at org.springframework.cloud.client.HostInfoEnvironmentPostProcessor.postProcessEnvironment(HostInfoEnvironmentPostProcessor.java:35)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEnvironmentPreparedEvent(ConfigFileApplicationListener.java:168)
at org.springframework.boot.context.config.ConfigFileApplicationListener.onApplicationEvent(ConfigFileApplicationListener.java:154)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:166)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:68)
at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54)
at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:337)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175)
at br.com.ibliss.auth.app.AuthServerApplication.main(AuthServerApplication.java:216)
Caused by: java.lang.ClassNotFoundException: org.springframework.boot.context.properties.source.ConfigurationPropertySources
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 14 more
推荐答案
According to ConfigurationPropertySources source, this class is around from version 2.0.0
提供对{@link ConfigurationPropertySource ConfigurationPropertySources}的访问权限. @author Phillip Webb
@自2.0.0起
Provides access to {@link ConfigurationPropertySource ConfigurationPropertySources}. @author Phillip Webb
@since 2.0.0
您可能没有升级Spring Boot版本,但实际上降级了.
You probably did not upgrade your spring boot version but actually downgrade.
这篇关于NoClassDefFoundError:ConfigurationPropertySources的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!