有人可以帮助找出我无法使用FeignClient
在本地设置application.properties
而无需运行领事的原因吗?
客户端:
@FeignClient(value = "my-service", configuration = FeignConfig.class) {
...
}
application.properties:
spring.cloud.consul.config.enabled=false
my-service.ribbon.listOfServers=127.0.0.1:8091
答案 0 :(得分:0)
管理配置@FeignClient
也可以使用aplication.properties
中的这些配置使用硬编码地址:
<service-name>.ribbon.listOfServers=<ip:port>
spring.cloud.bus.enabled=false
spring.cloud.consul.discovery.enabled=false
spring.cloud.consul.enabled=false