FeignClient異常

在使用springboot微服務(wù)的@FeignClient注解時(shí)報(bào)一下的錯(cuò)

16:31:30.788 [main] INFO  org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration - [initialize,98] - Located property source: CompositePropertySource {name='consul', propertySources=[ConsulPropertySource {name='config/sdb-journal-data-service/'}, ConsulPropertySource {name='config/application/'}]}
16:31:30.804 [main] WARN  org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration - [reinitializeLoggingSystem,137] - Logging config file location 'classpath:logback-spring.xml' cannot be opened and will be ignored
16:31:30.810 [main] INFO  cn.sciencedb.JournalApplication - [logStartupProfileInfo,675] - No active profile set, falling back to default profiles: default
16:31:31.771 [main] ERROR org.springframework.boot.SpringApplication - [reportFailure,858] - Application run failed
java.lang.IllegalArgumentException: Fallback class must implement the interface annotated by @FeignClient
    at org.springframework.util.Assert.isTrue(Assert.java:118)
    at org.springframework.cloud.openfeign.FeignClientsRegistrar.validateFallback(FeignClientsRegistrar.java:206)
    at org.springframework.cloud.openfeign.FeignClientsRegistrar.validate(FeignClientsRegistrar.java:201)
    at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerFeignClient(FeignClientsRegistrar.java:169)
    at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerFeignClients(FeignClientsRegistrar.java:158)
    at org.springframework.cloud.openfeign.FeignClientsRegistrar.registerBeanDefinitions(FeignClientsRegistrar.java:83)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.lambda$loadBeanDefinitionsFromRegistrars$1(ConfigurationClassBeanDefinitionReader.java:364)
    at java.util.LinkedHashMap.forEach(LinkedHashMap.java:684)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:363)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:145)
    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:117)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:327)
    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275)
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95)
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:691)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
    at cn.sciencedb.JournalApplication.main(JournalApplication.java:20)
Disconnected from the target VM, address: '127.0.0.1:52483', transport: 'socket'

解決方法

是因?yàn)?div id="lptppj7" class="image-package">
image.png

紅框中必須為實(shí)現(xiàn)類的 .class 文件

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市状原,隨后出現(xiàn)的幾起案子聋呢,更是在濱河造成了極大的恐慌,老刑警劉巖颠区,帶你破解...
    沈念sama閱讀 219,539評論 6 508
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件坝冕,死亡現(xiàn)場離奇詭異瓦呼,居然都是意外死亡测暗,警方通過查閱死者的電腦和手機(jī)央串,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,594評論 3 396
  • 文/潘曉璐 我一進(jìn)店門碗啄,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人饲宿,你說我怎么就攤上這事〉瑁” “怎么了?”我有些...
    開封第一講書人閱讀 165,871評論 0 356
  • 文/不壞的土叔 我叫張陵国夜,是天一觀的道長短绸。 經(jīng)常有香客問我车吹,道長醋闭,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,963評論 1 295
  • 正文 為了忘掉前任证逻,我火速辦了婚禮,結(jié)果婚禮上饮戳,老公的妹妹穿的比我還像新娘豪治。我一直安慰自己扯罐,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,984評論 6 393
  • 文/花漫 我一把揭開白布掩浙。 她就那樣靜靜地躺著,像睡著了一般厨姚。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上谬墙,一...
    開封第一講書人閱讀 51,763評論 1 307
  • 那天经备,我揣著相機(jī)與錄音,去河邊找鬼侵蒙。 笑死造虎,一個(gè)胖子當(dāng)著我的面吹牛纷闺,可吹牛的內(nèi)容都是我干的算凿。 我是一名探鬼主播,決...
    沈念sama閱讀 40,468評論 3 420
  • 文/蒼蘭香墨 我猛地睜開眼犁功,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了波桩?” 一聲冷哼從身側(cè)響起,我...
    開封第一講書人閱讀 39,357評論 0 276
  • 序言:老撾萬榮一對情侶失蹤镐躲,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后撒穷,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,850評論 1 317
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡端礼,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 38,002評論 3 338
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了佳镜。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 40,144評論 1 351
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡蟀伸,死狀恐怖缅刽,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情衰猛,我是刑警寧澤,帶...
    沈念sama閱讀 35,823評論 5 346
  • 正文 年R本政府宣布啡省,位于F島的核電站,受9級特大地震影響卦睹,放射性物質(zhì)發(fā)生泄漏微姊。R本人自食惡果不足惜分预,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,483評論 3 331
  • 文/蒙蒙 一薪捍、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧酪穿,春花似錦、人聲如沸被济。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,026評論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至预厌,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間轧叽,已是汗流浹背苗沧。 一陣腳步聲響...
    開封第一講書人閱讀 33,150評論 1 272
  • 我被黑心中介騙來泰國打工待逞, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人识樱。 一個(gè)月前我還...
    沈念sama閱讀 48,415評論 3 373
  • 正文 我出身青樓屿笼,卻偏偏與公主長得像牺荠,于是被迫代替她去往敵國和親驴一。 傳聞我的和親對象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 45,092評論 2 355

推薦閱讀更多精彩內(nèi)容