diff --git a/blade-auth/src/main/java/org/springblade/auth/support/BladeJwtTokenEnhancer.java b/blade-auth/src/main/java/org/springblade/auth/support/BladeJwtTokenEnhancer.java index 314ff2a2..f7321d75 100644 --- a/blade-auth/src/main/java/org/springblade/auth/support/BladeJwtTokenEnhancer.java +++ b/blade-auth/src/main/java/org/springblade/auth/support/BladeJwtTokenEnhancer.java @@ -82,8 +82,10 @@ public class BladeJwtTokenEnhancer implements TokenEnhancer { if (jwtProperties.getSingle()) { OAuth2RefreshToken oAuth2RefreshToken = oAuth2AccessToken.getRefreshToken(); - String refreshTokenValue = oAuth2RefreshToken.getValue(); - JwtUtil.addRefreshToken(tenantId, clientId, userId, refreshTokenValue, accessToken.getExpiresIn() * 168); + if(oAuth2RefreshToken!=null){ + String refreshTokenValue = oAuth2RefreshToken.getValue(); + JwtUtil.addRefreshToken(tenantId, clientId, userId, refreshTokenValue, accessToken.getExpiresIn() * 168); + } } } diff --git a/blade-gateway/src/main/resources/bootstrap.yml b/blade-gateway/src/main/resources/bootstrap.yml index 907d6ad2..7518ca9d 100644 --- a/blade-gateway/src/main/resources/bootstrap.yml +++ b/blade-gateway/src/main/resources/bootstrap.yml @@ -1,5 +1,5 @@ server: - port: 9999 + port: 8888 spring: cloud: