Consult with Fegin for remote access settings Hystrix fuse does not take effect

Source: Internet
Author: User

My Environment
1 Spring Cloud (FINCHLEY.SR1) based on spring boot 2.0.4
2. Divided into Eureka,merber,order. Order a way to call Merber by Fegin
confused
remote invocation using annotations @hystrixcommand The fuse can work,

But it doesn't work that way.

Code Show:
Pom.xml

<?xml version= "1.0" encoding= "UTF-8"? ><project xmlns= "http://maven.apache.org/POM/4.0.0" xmlns:xsi= "http ://www.w3.org/2001/XMLSchema-instance "xsi:schemalocation=" http://maven.apache.org/POM/4.0.0 Http://maven.apache . org/xsd/maven-4.0.0.xsd "> <modelVersion>4.0.0</modelVersion> <groupid>com.msop.order</ groupid> <artifactId>order</artifactId> <version>0.0.1-SNAPSHOT</version> <packagin G>jar</packaging> <name>order</name> <description>demo Project for Spring BOOT&LT;/DESCRI ption> <parent> <groupId>org.springframework.boot</groupId> <artifactid>spring-bo Ot-starter-parent</artifactid> <version>2.0.4.RELEASE</version> <relativePath/> < !--Lookup parent from repository-</parent> <properties> <project.build.sourceencoding& Gt Utf-8</project.build.sourceencodinG> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <java.versio N>1.8</java.version> <spring-cloud.version>Finchley.SR1</spring-cloud.version> </propert ies> <dependencies> <dependency> &LT;GROUPID&GT;ORG.SPRINGFRAMEWORK.BOOT&LT;/GROUPID&G            T            <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactid>spring-cloud-starter-netflix-eure ka-client</artifactid> </dependency> <dependency> <groupid>org.springfram Ework.cloud</groupid> <artifactId>spring-cloud-starter-netflix-hystrix</artifactId> &L            T;/dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactid>spring-cloud-starter-openfeign</artifactid> </dependency> </dependencies> <depe ndencymanagement> <dependencies> <dependency> <groupid>org.springfra                Mework.cloud</groupid> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud.version}</version> <type>pom</type> <scop    e>import</scope> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupid>org.springframework.boot</        Groupid> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build></project>

Application.properties

spring.application.name=orderserver.port=3001server.tomcat.max-threads=20eureka.client.service-url.defaultZone=http://localhost:1001/eureka/fegin.hystrix.enabled=truehystrix.command.default.exection.isolation.thread.timeoutInMilliseconds=4000ribbon.ReadTimeOut=4000ribbon.ConnectTimeOut=4000

Orderapplication Startup file

Fegin Interface File

Fegin Fallback class

Control files

Consult with Fegin for remote access settings Hystrix fuse does not take effect

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.