Hystrix 基于注解开发

不对地方,请指出!相互学习!

背景:Hystrix 没有无参构造函数,所以Spring管理bean时候没办法进行管理,

每个类都进行编码 个人感觉不方便,基于注解开发!方便速度快,不侵入代码!
引入的jar 坐标  

版本号  <hystrix.version>1.5.12</hystrix.version>

    <dependency>
                <groupId>com.netflix.hystrix</groupId>
                <artifactId>hystrix-core</artifactId>
                <version>${hystrix.version}</version>
            </dependency>
            <dependency>
                <groupId>com.netflix.hystrix</groupId>
                <artifactId>hystrix-metrics-event-stream</artifactId>
                <version>${hystrix.version}</version>
            </dependency>
            <dependency>
                <groupId>com.netflix.hystrix</groupId>
                <artifactId>hystrix-javanica</artifactId>
                <version>${hystrix.version}</version>
            </dependency>

hystrix-javanica 是注解的jar

原文地址:https://www.cnblogs.com/java-synchronized/p/7600130.html