feign服务调用,项目启动报错:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tokenController': Unsatisfied dependency expressed through field 'remoteDeptService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.neuray.oa.security.service.system.api.RemoteDeptService': Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException: No fallbackFactory instance of type class com.neuray.oa.security.service.system.api.factory.RemoteDeptFallbackFactory found for feign client remoteDeptServiceat org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:659)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:639)at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1431)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:619)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953)at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583)at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740)at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415)at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312)at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301)at com.neuray.oa.security.center.auth.AuthCenter.main(AuthCenter.java:18)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.neuray.oa.security.service.system.api.RemoteDeptService': Unexpected exception during bean creation; nested exception is java.lang.IllegalStateException: No fallbackFactory instance of type class com.neuray.oa.security.service.system.api.factory.RemoteDeptFallbackFactory found for feign client remoteDeptServiceat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:555)at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335)at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333)at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1389)at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309)at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:656)... 20 common frames omitted
Caused by: java.lang.IllegalStateException: No fallbackFactory instance of type class com.neuray.oa.security.service.system.api.factory.RemoteDeptFallbackFactory found for feign client remoteDeptServiceat com.alibaba.cloud.sentinel.feign.SentinelFeign$Builder$1.getFromContext(SentinelFeign.java:124)at com.alibaba.cloud.sentinel.feign.SentinelFeign$Builder$1.create(SentinelFeign.java:110)at org.springframework.cloud.openfeign.FeignCachingInvocationHandlerFactory.create(FeignCachingInvocationHandlerFactory.java:50)at feign.ReflectiveFeign.newInstance(ReflectiveFeign.java:64)at feign.Feign$Builder.target(Feign.java:268)at org.springframework.cloud.openfeign.DefaultTargeter.target(DefaultTargeter.java:30)at org.springframework.cloud.openfeign.FeignClientFactoryBean.loadBalance(FeignClientFactoryBean.java:379)at org.springframework.cloud.openfeign.FeignClientFactoryBean.getTarget(FeignClientFactoryBean.java:427)at org.springframework.cloud.openfeign.FeignClientFactoryBean.getObject(FeignClientFactoryBean.java:402)at org.springframework.cloud.openfeign.FeignClientsRegistrar.lambda$registerFeignClient$0(FeignClientsRegistrar.java:235)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.obtainFromSupplier(AbstractAutowireCapableBeanFactory.java:1249)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1191)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582)at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542)... 28 common frames omitted
17:24:21.156 [Thread-5] WARN  c.a.n.c.n.NotifyCenter - [shutdown,136] - [NotifyCenter] Start destroying Publisher
17:24:21.156 [Thread-5] WARN  c.a.n.c.n.NotifyCenter - [shutdown,153] - [NotifyCenter] Destruction of the end
Disconnected from the target VM, address: '127.0.0.1:55658', transport: 'socket'Process finished with exit code 1

解决方案是在SpringBoot启动类上添加扫描feign包路径

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class },scanBasePackages = {"com.neuray.oa.security.center.auth","com.neuray.oa.security.service.system.api"})

No fallbackFactory instance of type class com.neuray.oa.security.service.system.api.factory.RemoteDe相关推荐

  1. No fallbackFactory instance of type class com.chongyou.system.api.factory.RemoteUserFallbackFactory

    记录一下自己的开发报错之路 问题描述 在使用微服务之间的服务调用,并且实现了降级处理的.编译时报错 No fallbackFactory instance of type class com.chon ...

  2. No fallbackFactory instance of type class com.ruoyi.system.api.factory.RemoteLogFallbackFactory foun

    报错找不到这个类(托底类) /*** 日志服务降级处理* * @author ruoyi*/ @Component public class RemoteLogFallbackFactory impl ...

  3. No enclosing instance of type JDStudent is acAcessible. Must qualify the allocation with an enclosin

    No enclosing instance of type JDStudent is acAcessible. Must qualify the allocation with an enclosin ...

  4. 解决No enclosing instance of type * is accessible

    写一个内部类,并在构造函数中初始化时,遇到报错,搜索问题后发现,有网友出现过类似的问题,下面这个是说的浅显明白的,并确实解决了问题.于是,以下内容照搬过来,不再多费键盘了. public class ...

  5. No enclosing instance of type SmsUtils is accessible. Must qualify the allocation with an enclosing

    No enclosing instance of type SmsUtils is accessible. Must qualify the allocation with an enclosing ...

  6. No fallback instance of type class found for feign client user-service(转)

    No fallback instance of type class found for feign client user-service(转) 1.错误日志 在 feign 开启熔断,配置 fal ...

  7. Java出现No enclosing instance of type Test is accessible. Must qualify the allocation with an enclosin

    最近研究LDA源代码时,里面涉及到Comparable方法的使用.以前用过这个排序方法,现在想回顾一下.以下是程序,感觉没问题啊,结果报错了: Exception in thread "ma ...

  8. Java变异出现错误:No enclosing instance of type XXX is accessible

    摘要:写java代码时遇到下面的编译错误. 本文分享自华为云社区<Java中出现No enclosing instance of type XXX is accessible问题>,作者: ...

  9. No enclosing instance of type FormDetailBean is accessible. Must qualify the allocation with an encl

    最近在看Java,在编译写书上一个例子时,由于书上的代码只有一部分,于是就自己补了一个内部类.结果编译时出现:No enclosing instance of type E is accessible ...

最新文章

  1. 刘政:别着急颠覆传统数据分析人才培养,先将落脚点放在实处
  2. PPT中表现对比关系的3种设计手法
  3. omnigraffle怎么画曲线
  4. mate 10android o主题,Mate10不仅硬件强,还有安卓8.0
  5. 如何让一套代码适配所有iOS设备尺寸?
  6. 一个完整的数据分析体系,该长啥样?
  7. Linux -chattr -隐藏权限(附加权限)
  8. nginx过滤post请求头_Nginx Header,实现对HTTP/S请求、响应进行添加、修改、删除等操作...
  9. 【一周一算法】算法3:最常用的排序——快速排序
  10. 修改CentOS系统默认编码为中文utf8(也可修改成其他的)
  11. 线性回归(一):一元线性回归(附python实现)
  12. 国产开源数据库建模工具
  13. html动态生成tr标签,JS动态添加tr元素
  14. 性别为什么不适合建立索引-值重复率高的字段不适合建索引
  15. 科目二 后视镜 调节
  16. 全国高校计算机能力挑战赛赛事通知
  17. 混合现实:手柄定位不准或者经常性丢失
  18. 香橙派python编程_香橙派4B Python3.7安装OpenCV
  19. react二级路由的两种方法
  20. 运维工程师使用的运维平台和工具表

热门文章

  1. 为什么苹果照片电脑打不开 heic是什么文件
  2. C++ Error C2280 尝试引用已删除的函数(二)因std::mutex引起的拷贝
  3. python 传参之后 显示缺失参数_Python中的参数传递问题
  4. 山东大学软件学院项目实训-创新实训-山大软院网络攻防靶场实验平台(十三)-任意文件下载漏洞(1)
  5. Android动态换肤(一、应用内置多套皮肤)
  6. 距1900年1月份天数
  7. centos hostname修改
  8. 图解ReentrantLock公平锁和非公平锁实现
  9. Linux桌面发行版必死,Linux 发行版/桌面 体验报告(细节向)
  10. js逆向爬取某音乐网站某歌手的歌曲