order项目引入product的client报错

来源:5-9 项目改造成多模块

花花君子

2019-05-07

老师啊,实在看不出来,求帮忙
代码地址如下: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回答

廖师兄

2019-05-09

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

0
3
花花君子
回复
廖师兄
之前一直停留在请稍后的界面我以为回复成功了,早上看了一下没有就回了一下,谢谢师兄关心
2019-06-03
共3条回复

蠢动的毛线

2019-12-17

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

0
2
花花君子
回复
蠢动的毛线
还想回复你,恭喜解决问题
2019-12-17
共2条回复

SpringCloud Finchley(M2+RELEASE+SR2)微服务实战

SpringCloud组件实现微服务,【已升级Finchley.Release】

5668 学习 · 2489 问题

查看课程