首页 > 解决方案 > 有没有办法在注解@EnableFeignClient 中传递多个基础包

问题描述

我目前正在使用 1.4.4.RELEASE 版本的 spring-cloud-starter-openfeign。

我已经用@EnableFeignClients 注释了我的主类,并且由于项目的结构,我在多个包中有假装客户端。

因此,我尝试使用多个包添加 basepackages 属性,但出现编译时错误。

@EnableFeignClients(basePackages = {"com.abc.proj.services.api.client", "com.abc.pro.console.feign"})

出现以下错误:

',' 出乎意料

标签: javaspringspring-cloudspring-cloud-feign

解决方案


推荐阅读