栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > .Net

No qualifying bean of type ‘com.netflix.client.config.IClientConfig‘ available

.Net 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

No qualifying bean of type ‘com.netflix.client.config.IClientConfig‘ available

2020-11-04 17:10:12.616 WARN 6424 — [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘ribbonServerList’ defined in class path resource [com/alibaba/cloud/nacos/ribbon/NacosRibbonClientConfiguration.class]: Unsatisfied dependency expressed through method ‘ribbonServerList’ parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.netflix.client.config.IClientConfig’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
2020-11-04 17:10:12.643 INFO 6424 — [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-11-04 17:10:12.656 WARN 6424 — [ restartedMain] o.a.c.loader.WebappClassLoaderBase : The web application [server] appears to have started a thread named [logback-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer C o n d i t i o n O b j e c t . a w a i t N a n o s ( A b s t r a c t Q u e u e d S y n c h r o n i z e r . j a v a : 2078 ) j a v a . u t i l . c o n c u r r e n t . S c h e d u l e d T h r e a d P o o l E x e c u t o r ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.ScheduledThreadPoolExecutor ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)java.util.concurrent.ScheduledThreadPoolExecutorDelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
java.util.concurrent.ScheduledThreadPoolExecutor D e l a y e d W o r k Q u e u e . t a k e ( S c h e d u l e d T h r e a d P o o l E x e c u t o r . j a v a : 809 ) j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r . g e t T a s k ( T h r e a d P o o l E x e c u t o r . j a v a : 1074 ) j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r . r u n W o r k e r ( T h r e a d P o o l E x e c u t o r . j a v a : 1134 ) j a v a . u t i l . c o n c u r r e n t . T h r e a d P o o l E x e c u t o r DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) java.util.concurrent.ThreadPoolExecutor DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134)java.util.concurrent.ThreadPoolExecutorWorker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)
2020-11-04 17:10:12.657 WARN 6424 — [ restartedMain] o.a.c.loader.WebappClassLoaderBase : The web application [server] appears to have started a thread named [com.alibaba.nacos.naming.client.listener] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
sun.misc.Unsafe.park(Native Method)
java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
java.util.concurrent.locks.AbstractQueuedSynchronizer C o n d i t i o n O b j e c t . a w a i t N a n o s ( A b s t r a c t Q u e u e d S y n c h r o n i z e r . j a v a : 2078 ) j a v a . u t i l . c o n c u r r e n t . L i n k e d B l o c k i n g Q u e u e . p o l l ( L i n k e d B l o c k i n g Q u e u e . j a v a : 467 ) c o m . a l i b a b a . n a c o s . c l i e n t . n a m i n g . c o r e . E v e n t D i s p a t c h e r ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467) com.alibaba.nacos.client.naming.core.EventDispatcher ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:467)com.alibaba.nacos.client.naming.core.EventDispatcherNotifier.run(EventDispatcher.java:114)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
java.lang.Thread.run(Thread.java:748)

.authorizeRequests()
.antMatchers("/login","/oauth/authorize","/oauth/token","/code/sms","/register/setPassword","/register/PasswordSendSms","/getRandomGrulla",
“/app/selectLast”).permitAll()
.anyRequest().authenticated()
.and()
.csrf().disable();

解决办法:

import com.netflix.client.config.DefaultClientConfigImpl;
import com.netflix.client.config.IClientConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


@Configuration
public class ConfigurerBean {

    @Bean
    public IClientConfig iClientConfig() {
        return new DefaultClientConfigImpl();
    }
}
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/907834.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号