Spring Boot模块化后,服务间调用 的坑

版权声明:版权声明:本文为博主原创文章,转载请注明出处。 https://blog.csdn.net/lililuni/article/details/83187268

问题背景:

     product 服务作为服务端,提供了一个 对外通信Fegin接口 ProductClient,放在了com.imooc.product.client jar包下

      order 服务作为客户端,直接引用上面的jar,使用 ProductClient ,启动主类后报下图错误:

解决办法:

     多模块化时,应该在order主类上添加下面圈出来的注解,这样启动后就能扫描这个包。

猜你喜欢

转载自blog.csdn.net/lililuni/article/details/83187268