mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 12:56:28 +08:00
update
This commit is contained in:
@@ -15,7 +15,7 @@ import com.gitee.sop.gatewaycommon.validate.ApiValidator;
|
|||||||
import com.gitee.sop.gatewaycommon.validate.Encrypter;
|
import com.gitee.sop.gatewaycommon.validate.Encrypter;
|
||||||
import com.gitee.sop.gatewaycommon.validate.Signer;
|
import com.gitee.sop.gatewaycommon.validate.Signer;
|
||||||
import com.gitee.sop.gatewaycommon.validate.Validator;
|
import com.gitee.sop.gatewaycommon.validate.Validator;
|
||||||
import com.gitee.sop.gatewaycommon.zuul.configuration.BaseZuulController;
|
import com.gitee.sop.gatewaycommon.zuul.configuration.ZuulErrorController;
|
||||||
import com.gitee.sop.gatewaycommon.zuul.param.ZuulParamBuilder;
|
import com.gitee.sop.gatewaycommon.zuul.param.ZuulParamBuilder;
|
||||||
import com.gitee.sop.gatewaycommon.zuul.result.ZuulResultExecutor;
|
import com.gitee.sop.gatewaycommon.zuul.result.ZuulResultExecutor;
|
||||||
import com.netflix.zuul.context.RequestContext;
|
import com.netflix.zuul.context.RequestContext;
|
||||||
@@ -82,7 +82,10 @@ public class ApiConfig {
|
|||||||
*/
|
*/
|
||||||
private SessionManager sessionManager = new ApiSessionManager();
|
private SessionManager sessionManager = new ApiSessionManager();
|
||||||
|
|
||||||
private BaseZuulController baseZuulController = new BaseZuulController();
|
/**
|
||||||
|
* zuul网关全局异常处理
|
||||||
|
*/
|
||||||
|
private ZuulErrorController zuulErrorController = new ZuulErrorController();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 错误模块
|
* 错误模块
|
||||||
|
@@ -76,8 +76,8 @@ public class BaseZuulConfiguration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
BaseZuulController baseZuulController() {
|
ZuulErrorController baseZuulController() {
|
||||||
return ApiContext.getApiConfig().getBaseZuulController();
|
return ApiContext.getApiConfig().getZuulErrorController();
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostConstruct
|
@PostConstruct
|
||||||
|
@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
|
|||||||
*/
|
*/
|
||||||
@Controller
|
@Controller
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class BaseZuulController implements ErrorController {
|
public class ZuulErrorController implements ErrorController {
|
||||||
|
|
||||||
public static final String ERROR_PATH = "/error";
|
public static final String ERROR_PATH = "/error";
|
||||||
|
|
Reference in New Issue
Block a user