Newer
Older
newfiber-termite / newfiber-gateway / src / main / java / com / newfiber / gateway / config / GatewayConfig.java
@yanghui yanghui on 11 May 573 bytes 白蚁项目初版代码提交
package com.newfiber.gateway.config;

import com.newfiber.gateway.handler.SentinelFallbackHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 * 网关限流配置
 * 
 * @author newfiber
 */
@Configuration
public class GatewayConfig{
    @Bean
    @Order(Ordered.HIGHEST_PRECEDENCE)
    public SentinelFallbackHandler sentinelGatewayExceptionHandler(){
        return new SentinelFallbackHandler();
    }
}