1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

import changes from master

reorganizing modules
This commit is contained in:
theonefx
2020-04-02 16:52:12 +08:00
parent 5acdce7f4d
commit c579109d2a
714 changed files with 11386 additions and 17320 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 the original author or authors.
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -17,7 +17,6 @@
package com.alibaba.cloud.examples;
import com.alibaba.csp.sentinel.adapter.gateway.sc.callback.BlockRequestHandler;
import reactor.core.publisher.Mono;
import org.springframework.context.annotation.Bean;
@@ -40,8 +39,7 @@ public class MySCGConfiguration {
@Override
public Mono<ServerResponse> handleRequest(ServerWebExchange exchange,
Throwable t) {
return ServerResponse.status(444)
.contentType(MediaType.APPLICATION_JSON_UTF8)
return ServerResponse.status(444).contentType(MediaType.APPLICATION_JSON)
.body(fromObject("SCS Sentinel block"));
}
};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 the original author or authors.
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ import com.alibaba.csp.sentinel.adapter.gateway.common.rule.GatewayFlowRule;
import com.alibaba.csp.sentinel.adapter.gateway.common.rule.GatewayRuleManager;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRule;
import com.alibaba.csp.sentinel.slots.block.flow.FlowRuleManager;
import reactor.core.publisher.Mono;
import org.springframework.web.bind.annotation.GetMapping;

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 the original author or authors.
* Copyright 2013-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -31,15 +31,13 @@ spring:
ruleType: gw-api-group
transport:
dashboard: localhost:8080
# filter:
# enabled: true
filter:
enabled: true
scg.fallback:
mode: redirect
redirect: http://www.taobao.com
mode: response
response-status: 444
response-body: 1234
scg:
order: -100
# response-status: 444
# response-body: 1234
# content-type: text/plain
management.endpoints.web.exposure.include: "*"