首先我们记录一下springboot当中如何集成feign远程服务调用插件 ### 比如我们需要在batch模块当中去调用business里面的服务,那么就必须在batch模块的pom.xml当中集成依赖 如下图所示: ![](https://img.kancloud.cn/18/d1/18d1e41f133b5b07f0cc2248634ce618_1477x854.png) ### 另外就是batch模块的启动类当中必须引入注解指定feign的包路径 ![](https://img.kancloud.cn/4c/aa/4caa1f5fa4c58e870bec87d14b00afb0_1574x888.png) ### 路径如下图所示 ![](https://img.kancloud.cn/3d/98/3d98aae5990e5b37382e118c9d758900_1912x924.png) ### 然后就是在Feign目录下变成远程调用 ![](https://img.kancloud.cn/bf/5d/bf5db2aa871d1984b89e84021ff9e71e_1690x759.png) ### 剩下的就是去使用了 ### 在batch模块当中的控制器里面就可以使用batch的feign里面远程调用类来实现远程调用了 ![](https://img.kancloud.cn/ef/83/ef8364f19eba7aff6fad27e33919517c_1843x984.png) ### 你可以在feign目录下写更多的远程调用 ![](https://img.kancloud.cn/e3/0e/e30e5b57f49d737f4c9aea1e239d094e_1632x877.png) 在batch当中的任何地方都可以调用这个feign进行远程服务的调用 ![](https://img.kancloud.cn/d0/3e/d03e8eccbe349f716a31fdc7c85ee1fa_1520x978.png) ### 是不是很简单!!!