提交 471297f0 编写于 作者: zlt2000's avatar zlt2000

升级依赖版本

上级 8d7d8f3f
# zlt-microservices-platform # zlt-microservices-platform
<p align="center"> <p align="center">
<img src="https://img.shields.io/badge/Spring%20Boot-2.3.11.RELEASE-blue" alt="Downloads"/> <img src="https://img.shields.io/badge/Spring%20Boot-2.3.12.RELEASE-blue" alt="Downloads"/>
<img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR9-blue" alt="Downloads"/> <img src="https://img.shields.io/badge/Spring%20Cloud-Hoxton.SR12-blue" alt="Downloads"/>
<img src="https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2.2.5.RELEASE-blue" alt="Downloads"/> <img src="https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2.2.6.RELEASE-blue" alt="Downloads"/>
<img src="https://img.shields.io/badge/Elasticsearch-7.x-brightgreen" alt="Downloads"/> <img src="https://img.shields.io/badge/Elasticsearch-7.x-brightgreen" alt="Downloads"/>
<a target="_blank" href='https://gitee.com/zlt2000/microservices-platform'> <a target="_blank" href='https://gitee.com/zlt2000/microservices-platform'>
<img src='https://gitee.com/zlt2000/microservices-platform/badge/star.svg' alt='star'/> <img src='https://gitee.com/zlt2000/microservices-platform/badge/star.svg' alt='star'/>
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
</p> </p>
## 如果您觉得有帮助,请点右上角 "Star" 支持一下谢谢 ## 如果您觉得有帮助,请点右上角 "Star" 支持一下谢谢
&nbsp; &nbsp;
## 1. 总体架构图 ## 1. 总体架构图
......
...@@ -13,9 +13,9 @@ ...@@ -13,9 +13,9 @@
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>8</java.version> <java.version>8</java.version>
<spring-cloud-alibaba-dependencies.version>2.2.5.RELEASE</spring-cloud-alibaba-dependencies.version> <spring-cloud-alibaba-dependencies.version>2.2.6.RELEASE</spring-cloud-alibaba-dependencies.version>
<spring-boot-dependencies.version>2.3.11.RELEASE</spring-boot-dependencies.version> <spring-boot-dependencies.version>2.3.12.RELEASE</spring-boot-dependencies.version>
<spring-cloud-dependencies.version>Hoxton.SR9</spring-cloud-dependencies.version> <spring-cloud-dependencies.version>Hoxton.SR12</spring-cloud-dependencies.version>
<commons-collections4.version>4.4</commons-collections4.version> <commons-collections4.version>4.4</commons-collections4.version>
<swagger.version>2.9.2</swagger.version> <swagger.version>2.9.2</swagger.version>
<swagger.ui.version>1.8.7</swagger.ui.version> <swagger.ui.version>1.8.7</swagger.ui.version>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<sharding-sphere.version>3.1.0</sharding-sphere.version> <sharding-sphere.version>3.1.0</sharding-sphere.version>
<security-oauth2.version>2.3.8.RELEASE</security-oauth2.version> <security-oauth2.version>2.3.8.RELEASE</security-oauth2.version>
<security-jwt.version>1.1.0.RELEASE</security-jwt.version> <security-jwt.version>1.1.0.RELEASE</security-jwt.version>
<redisson-starter.version>3.14.1</redisson-starter.version> <redisson-starter.version>3.16.0</redisson-starter.version>
<easyCaptcha.version>1.6.2</easyCaptcha.version> <easyCaptcha.version>1.6.2</easyCaptcha.version>
<hutool.version>5.1.4</hutool.version> <hutool.version>5.1.4</hutool.version>
<mybatis-plus-boot-starter.version>3.4.0</mybatis-plus-boot-starter.version> <mybatis-plus-boot-starter.version>3.4.0</mybatis-plus-boot-starter.version>
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
<txlcn.version>5.0.2.RELEASE</txlcn.version> <txlcn.version>5.0.2.RELEASE</txlcn.version>
<fastdfs-client.version>1.27.2</fastdfs-client.version> <fastdfs-client.version>1.27.2</fastdfs-client.version>
<userAgent.version>1.21</userAgent.version> <userAgent.version>1.21</userAgent.version>
<transmittable.version>2.12.0</transmittable.version> <transmittable.version>2.12.1</transmittable.version>
<banner.version>1.0.2</banner.version> <banner.version>1.0.2</banner.version>
<commons-beanutils.version>1.9.4</commons-beanutils.version> <commons-beanutils.version>1.9.4</commons-beanutils.version>
<spring-social-security.version>1.1.6.RELEASE</spring-social-security.version> <spring-social-security.version>1.1.6.RELEASE</spring-social-security.version>
<commons-io.version>2.7</commons-io.version> <commons-io.version>2.7</commons-io.version>
<servlet-api.version>4.0.1</servlet-api.version> <servlet-api.version>4.0.1</servlet-api.version>
<spring-data-elasticsearch.version>4.1.3</spring-data-elasticsearch.version> <spring-data-elasticsearch.version>4.2.3</spring-data-elasticsearch.version>
<elasticsearch.version>7.11.2</elasticsearch.version> <elasticsearch.version>7.11.2</elasticsearch.version>
<knife4j.version>2.0.5</knife4j.version> <knife4j.version>2.0.5</knife4j.version>
<hibernate-validator.version>6.2.0.Final</hibernate-validator.version> <hibernate-validator.version>6.2.0.Final</hibernate-validator.version>
......
package com.central.gateway.auth; package com.central.gateway.auth;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.central.common.constant.SecurityConstants; import com.central.common.constant.SecurityConstants;
import com.central.common.model.SysUser; import com.central.common.model.SysUser;
import com.central.oauth2.common.util.AuthUtils; import com.central.oauth2.common.util.AuthUtils;
...@@ -26,7 +27,7 @@ import reactor.core.publisher.Mono; ...@@ -26,7 +27,7 @@ import reactor.core.publisher.Mono;
public class Oauth2AuthSuccessHandler implements ServerAuthenticationSuccessHandler { public class Oauth2AuthSuccessHandler implements ServerAuthenticationSuccessHandler {
@Override @Override
public Mono<Void> onAuthenticationSuccess(WebFilterExchange webFilterExchange, Authentication authentication) { public Mono<Void> onAuthenticationSuccess(WebFilterExchange webFilterExchange, Authentication authentication) {
MultiValueMap<String, String> headerValues = new LinkedMultiValueMap(4); MultiValueMap<String, String> headerValues = new LinkedMultiValueMap<>(4);
Object principal = authentication.getPrincipal(); Object principal = authentication.getPrincipal();
//客户端模式只返回一个clientId //客户端模式只返回一个clientId
if (principal instanceof SysUser) { if (principal instanceof SysUser) {
...@@ -39,8 +40,9 @@ public class Oauth2AuthSuccessHandler implements ServerAuthenticationSuccessHand ...@@ -39,8 +40,9 @@ public class Oauth2AuthSuccessHandler implements ServerAuthenticationSuccessHand
headerValues.add(SecurityConstants.TENANT_HEADER, clientId); headerValues.add(SecurityConstants.TENANT_HEADER, clientId);
headerValues.add(SecurityConstants.ROLE_HEADER, CollectionUtil.join(authentication.getAuthorities(), ",")); headerValues.add(SecurityConstants.ROLE_HEADER, CollectionUtil.join(authentication.getAuthorities(), ","));
String accountType = AuthUtils.getAccountType(oauth2Authentication.getUserAuthentication()); String accountType = AuthUtils.getAccountType(oauth2Authentication.getUserAuthentication());
headerValues.add(SecurityConstants.ACCOUNT_TYPE_HEADER, accountType); if (StrUtil.isNotEmpty(accountType)) {
headerValues.add(SecurityConstants.ACCOUNT_TYPE_HEADER, accountType);
}
ServerWebExchange exchange = webFilterExchange.getExchange(); ServerWebExchange exchange = webFilterExchange.getExchange();
ServerHttpRequest serverHttpRequest = exchange.getRequest().mutate() ServerHttpRequest serverHttpRequest = exchange.getRequest().mutate()
.headers(h -> h.addAll(headerValues)) .headers(h -> h.addAll(headerValues))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册