关于org.springframework.cloud.context.named.NamedContextFactory$Specification 的问题!

简介: 关于org.springframework.cloud.context.named.NamedContextFactory$Specification 的问题!

今天在启动springboot项目时出现了一个小插曲,昨天能跑起来的程序突然就爆出来了一个错误,真的是让人匪夷所思!报错信息是这样的:

Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.context.named.NamedContextFactory$Specification
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 34 common frames omitted

很明显上面提示 org.springframework.cloud 下的没有被找到,那我们就去maven仓库找一下这个依赖进行导入!
在这里插入图片描述
在这里插入图片描述
在依赖导入之后项目就可以正常启动了!!!至于为什么之前能够正常启动而突然报错,这个由于能力问题暂时没有排查出来,上面的解决方法是个人见解,可能会有问题和错误,希望小伙伴们可以指正😘😘。

目录
相关文章
|
6天前
SpringCloud启动Consider defining a bean of type ‘org.springframework.web.client.RestTemplate‘ in your
SpringCloud启动Consider defining a bean of type ‘org.springframework.web.client.RestTemplate‘ in your
23 1
|
6天前
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
268 0
|
7月前
|
Java
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
|
10月前
No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail
No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail
114 1
|
11月前
|
Java 应用服务中间件 Maven
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
83 0
|
11月前
|
Java 数据库连接 Spring
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ XXX‘
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ XXX‘
134 0
|
前端开发 Java 应用服务中间件
Error configuring application listener of class org.springframework.web.context.ContextLoader
Error configuring application listener of class org.springframework.web.context.ContextLoader
Error configuring application listener of class org.springframework.web.context.ContextLoader
|
Java Spring
required a bean of type ‘org.springframework.web.client.RestTemplate‘ that could not be found.
required a bean of type ‘org.springframework.web.client.RestTemplate‘ that could not be found.
required a bean of type ‘org.springframework.web.client.RestTemplate‘ that could not be found.
|
缓存 Java Maven
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
107 0
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
|
Java Maven
严重: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener
严重: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener
111 0
严重: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener