Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/gdsgdh308227363/article/details/88787518
First copy userservice a service engineer, modify the port number: -Dserver.port
Dependence on the introduction of consumer
On resttemplate annotated
Path modification request for the service name
springcloud fuse
Step one: lead dependence
Add comment
Part III
Add a timeout
Hystix fuse and configuration:
1, openfeign:
Add dependence:
Write an interface
feigein load balancing
ribbon:
ConnectTimeout: 250 # Ribbon的连接超时时间
ReadTimeout: 1000 # Ribbon的数据读取超时时间
OkToRetryOnAllOperations: true # 是否对所有操作都进行重试
MaxAutoRetriesNextServer: 1 # 切换实例的重试次数
MaxAutoRetries: 1 # 对当前实例的重试次数
Feign default there to Hystix integration fuse
The removal of global prefix does not work well: try not to configure
Load balancing and fusing configuration
springcloud micro-service system