请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

order项目引入product的client报错

老师啊,实在看不出来,求帮忙
代码地址如下:https://gitee.com/springCloud_Sell_niaoge/orderandproduct.git
报错信息如下:
java.lang.ClassCastException: org.springframework.boot.context.event.ApplicationFailedEvent cannot be cast to org.springframework.boot.web.context.WebServerInitializedEvent
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:159) [spring-context-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) [spring-context-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) [spring-context-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.boot.context.event.EventPublishingRunListener.finished(EventPublishingRunListener.java:114) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
at org.springframework.boot.SpringApplicationRunListeners.callFinishedListener(SpringApplicationRunListeners.java:79) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
at org.springframework.boot.SpringApplicationRunListeners.finished(SpringApplicationRunListeners.java:72) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:803) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.M3.jar:2.0.0.M3]
at com.imooc.order.OrderApplication.main(OrderApplication.java:14) [classes/:na]

2019-05-07 14:03:36.275 INFO [order,] 9564 — [ main] utoConfigurationReportLoggingInitializer :

Error starting ApplicationContext. To display the auto-configuration report re-run your application with ‘debug’ enabled.
2019-05-07 14:03:36.559 ERROR [order,] 9564 — [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field productClient in com.imooc.order.service.impl.OrderServiceImpl required a bean of type ‘com.imooc.product.client.ProductClient’ that could not be found.

Action:

Consider defining a bean of type ‘com.imooc.product.client.ProductClient’ in your configuration.

Process finished with exit code 1

正在回答

2回答

product install过了?  你看下我补充的多模块视频。

0 回复 有任何疑惑可以回复我~
  • 提问者 花花君子 #1
    非常感谢!
    回复 有任何疑惑可以回复我~ 2019-06-02 20:07:19
  • 廖师兄 回复 提问者 花花君子 #2
    解决了吗,现在才回复我。。。
    回复 有任何疑惑可以回复我~ 2019-06-02 23:43:37
  • 提问者 花花君子 回复 廖师兄 #3
    之前一直停留在请稍后的界面我以为回复成功了,早上看了一下没有就回了一下,谢谢师兄关心
    回复 有任何疑惑可以回复我~ 2019-06-03 20:25:12
蠢动的毛线 2019-12-17 15:58:09

我出现和你一样的问题,product install也安装过,补充的视频也看过了,请问你最后是怎么解决的?

0 回复 有任何疑惑可以回复我~
  • 已经解决了,谢谢!在order启动类上的注解@EnableFeignClients改成
    @EnableFeignClients(basePackages = "com.imooc.product.client")就可以了
    回复 有任何疑惑可以回复我~ 2019-12-17 16:14:19
  • 提问者 花花君子 回复 蠢动的毛线 #2
    还想回复你,恭喜解决问题
    回复 有任何疑惑可以回复我~ 2019-12-17 16:25:52
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信