关于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仓库找一下这个依赖进行导入!
在这里插入图片描述
在这里插入图片描述
在依赖导入之后项目就可以正常启动了!!!至于为什么之前能够正常启动而突然报错,这个由于能力问题暂时没有排查出来,上面的解决方法是个人见解,可能会有问题和错误,希望小伙伴们可以指正😘😘。

目录
相关文章
|
4月前
Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationManager' in your configuration.
Consider defining a bean of type 'org.springframework.security.authentication.AuthenticationManager' in your configuration.
107 0
|
Java 微服务 Spring
【Java异常】Spring boot启动失败@org.springframework.beans.factory.annotation.Autowired(required=true)
【Java异常】Spring boot启动失败@org.springframework.beans.factory.annotation.Autowired(required=true)
311 0
|
7月前
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
135 1
|
7月前
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
解决The injection point has the following annotations:@org.springframework.beans.factory.annotation错误~
1155 0
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail
No qualifying bean of type ‘org.springframework.boot.autoconfigure.http.HttpMessageConverters‘ avail
163 1
|
Java Spring
[org.springframework.cloud.openfeign.FeignClientFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
这个日志信息是Spring框架中的一个`BeanPostProcessor`在启动时输出的。它在扫描应用程序中定义的所有Bean并将它们注册到应用程序上下文之前执行。然后,它检查每个Bean是否适合被所有`BeanPostProcessor`处理,也就是是否可以被动态代理拦截。
1584 1
|
前端开发 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 应用服务中间件 Maven
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
Error configuring application listener of class org.springframework.web.context.ContextLoaderListene
113 0
|
Java 数据库连接 Spring
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ XXX‘
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘ XXX‘
299 0