當使用FeignClient
使用在SQL Server中執行查詢的服務時,我的應用程序正在收到錯誤。如何解決超時FeignClient
錯誤:
Exception in thread "pool-10-thread-14" feign.RetryableException: Read timed out executing GET http://127.0.0.1:8876/processoData/search/buscaProcessoPorCliente?cliente=ELEKTRO+-+TRABALHISTA&estado=SP
我的消費服務:
@FeignClient(url="http://127.0.0.1:8876")
public interface ProcessoConsumer {
@RequestMapping(method = RequestMethod.GET, value = "/processoData/search/buscaProcessoPorCliente?cliente={cliente}&estado={estado}")
public PagedResources<ProcessoDTO> buscaProcessoClienteEstado(@PathVariable("cliente") String cliente, @PathVariable("estado") String estado);
}
我陽明:
server:
port: 8874
endpoints:
restart:
enabled: true
shutdown:
enabled: true
health:
sensitive: false
eureka:
client:
serviceUrl:
defaultZone: ${vcap.services.eureka-service.credentials.uri:http://xxx.xx.xxx.xx:8764}/eureka/
instance:
preferIpAddress: true
ribbon:
eureka:
enabled: true
spring:
application:
name: MyApplication
data:
mongodb:
host: xxx.xx.xxx.xx
port: 27017
uri: mongodb://xxx.xx.xxx.xx/recortesExtrator
repositories.enabled: true
solr:
host: http://xxx.xx.xxx.xx:8983/solr
repositories.enabled: true
有誰知道如何解決這個問題?
感謝。
嘿雷南,之後你會得到一個超時錯誤和多久到後端的呼叫通常需要? –
爲什麼你的費恩客戶說端口8876,但你的YML配置說端口8874? – psantamaria