关于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.
108 0
|
5月前
|
Java Apache Spring
若依配Mapper,若依修改Caused by: org.springframework.beans.factory.BeanCreationException: Error creating
若依配Mapper,若依修改Caused by: org.springframework.beans.factory.BeanCreationException: Error creating
|
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
144 1
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
Caused by: org.springframework.context.ApplicationContextException: Unable to start ServletWebServer
|
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 关系型数据库 MySQL
Dependency ‘org.springframeworkspring-context5.0.2.RELEASE‘ not found
Dependency ‘org.springframeworkspring-context5.0.2.RELEASE‘ not found
192 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 应用服务中间件 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 Maven
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
严重: Error configuring application listener of class org.springframework.web.context.ContextLoaderLis
138 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
159 0
严重: Error configuring application listener of class org.springframework.web.util.Log4jConfigListener