All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nepxion.discovery.plugin.strategy.hystrix.configuration.HystrixStrategyAutoConfiguration Maven / Gradle / Ivy

Go to download

Nepxion Discovery is a solution for Spring Cloud with blue green, gray, weight, limitation, circuit breaker, degrade, isolation, monitor, tracing, dye, failover, async agent

There is a newer version: 6.22.0
Show newest version
package com.nepxion.discovery.plugin.strategy.hystrix.configuration;

/**
 * 

Title: Nepxion Discovery

*

Description: Nepxion Discovery

*

Copyright: Copyright (c) 2017-2050

*

Company: Nepxion

* @author Haojun Ren * @author Hao Huang * @version 1.0 */ import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import com.nepxion.banner.BannerConstant; import com.nepxion.banner.Description; import com.nepxion.banner.LogoBanner; import com.nepxion.banner.NepxionBanner; import com.nepxion.discovery.common.entity.ProtectorType; import com.nepxion.discovery.plugin.strategy.constant.StrategyConstant; import com.nepxion.discovery.plugin.strategy.hystrix.context.HystrixContextConcurrencyStrategy; import com.netflix.hystrix.Hystrix; import com.taobao.text.Color; @Configuration @ConditionalOnClass(Hystrix.class) @ConditionalOnProperty(value = StrategyConstant.SPRING_APPLICATION_STRATEGY_HYSTRIX_THREADLOCAL_SUPPORTED, matchIfMissing = false) public class HystrixStrategyAutoConfiguration { static { LogoBanner logoBanner = new LogoBanner(HystrixStrategyAutoConfiguration.class, "/com/nepxion/hystrix/resource/logo.txt", "Welcome to Nepxion", 7, 5, new Color[] { Color.red, Color.green, Color.cyan, Color.blue, Color.yellow, Color.magenta, Color.red }, true); NepxionBanner.show(logoBanner, new Description("Protector:", ProtectorType.HYSTRIX.toString(), 0, 1), new Description(BannerConstant.GITHUB + ":", BannerConstant.NEPXION_GITHUB + "/Discovery", 0, 1)); } @Bean public HystrixContextConcurrencyStrategy hystrixContextConcurrencyStrategy() { return new HystrixContextConcurrencyStrategy(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy