From 05afcd761eb8b1e35558971ff7b9f9aae20078f2 Mon Sep 17 00:00:00 2001 From: zlt2000 Date: Sun, 12 Apr 2020 22:46:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 11 +++++------ .../gateway/error/JsonErrorWebExceptionHandler.java | 3 +-- .../oauth/filter/LoginProcessSetTenantFilter.java | 4 ++-- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 4d545b9..dcde6c5 100644 --- a/pom.xml +++ b/pom.xml @@ -13,6 +13,9 @@ 1.8 UTF-8 8 + 2.1.1.RELEASE + 2.1.12.RELEASE + Greenwich.SR5 4.4 1.2.62 2.9.2 @@ -33,7 +36,7 @@ 7.2.28 4.1.3 4.1.1 - 2.1.6 + 2.2.2 1.7 2.6 5.0.2.RELEASE @@ -47,10 +50,6 @@ 2.6 4.0.1 3.2.5.RELEASE - 2.1.1.RELEASE - 2.1.12.RELEASE - Greenwich.SR5 - 2.1.12.RELEASE 1.2.2 zlt-job/**/*, zlt-register/**/*, zlt-web/**/* openjdk:8-jre-alpine @@ -380,7 +379,7 @@ org.springframework.boot spring-boot-maven-plugin - ${spring-boot-maven-plugin.version} + ${spring-boot-dependencies.version} com.spotify diff --git a/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java b/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java index 3bb1533..27c64e9 100644 --- a/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java +++ b/zlt-gateway/sc-gateway/src/main/java/com/central/gateway/error/JsonErrorWebExceptionHandler.java @@ -50,8 +50,7 @@ public class JsonErrorWebExceptionHandler extends DefaultErrorWebExceptionHandle */ @Override protected HttpStatus getHttpStatus(Map errorAttributes) { - int statusCode = (int) errorAttributes.get("code"); - return HttpStatus.valueOf(statusCode); + return HttpStatus.INTERNAL_SERVER_ERROR; } /** diff --git a/zlt-uaa/src/main/java/com/central/oauth/filter/LoginProcessSetTenantFilter.java b/zlt-uaa/src/main/java/com/central/oauth/filter/LoginProcessSetTenantFilter.java index 5b7b0dc..7030122 100644 --- a/zlt-uaa/src/main/java/com/central/oauth/filter/LoginProcessSetTenantFilter.java +++ b/zlt-uaa/src/main/java/com/central/oauth/filter/LoginProcessSetTenantFilter.java @@ -1,9 +1,9 @@ package com.central.oauth.filter; import cn.hutool.core.util.ArrayUtil; -import com.alibaba.nacos.common.util.HttpMethod; import com.central.common.constant.SecurityConstants; import com.central.common.context.TenantContextHolder; +import org.springframework.http.HttpMethod; import org.springframework.security.web.savedrequest.DefaultSavedRequest; import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.security.web.util.matcher.RequestMatcher; @@ -29,7 +29,7 @@ public class LoginProcessSetTenantFilter extends OncePerRequestFilter { private RequestMatcher requiresAuthenticationRequestMatcher; public LoginProcessSetTenantFilter() { - requiresAuthenticationRequestMatcher = new AntPathRequestMatcher(SecurityConstants.OAUTH_LOGIN_PRO_URL, HttpMethod.POST); + requiresAuthenticationRequestMatcher = new AntPathRequestMatcher(SecurityConstants.OAUTH_LOGIN_PRO_URL, HttpMethod.POST.name()); } /** -- GitLab