大学老师从讲师到正教授,平均需要12.5年!

核心内容摘要

【Vue】scoped作用 父子组件通信 props emit
毕设计算机科学与技术:从选题到实现的系统性技术指南

零代码体验:AI股票分析师镜像快速入门指南

套路脚手架看一眼就行了没啥技术含量package com.tianji.gateway.filter; import com.tianji.authsdk.gateway.util.AuthUtil; import com.tianji.common.domain.R; import com.tianji.common.domain.dto.LoginUserDTO; import com.tianji.gateway.config.AuthProperties; import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.core.Ordered; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.stereotype.Component; import org.springframework.util.AntPathMatcher; import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; import java.util.List; import static com.tianji.auth.common.constants.JwtConstants.AUTHORIZATION_HEADER; import static com.tianji.auth.common.constants.JwtConstants.USER_HEADER; Component public class AccountAuthFilter implements GlobalFilter, Ordered { private final AuthUtil authUtil; private final AuthProperties authProperties; private final AntPathMatcher antPathMatcher new AntPathMatcher(); public AccountAuthFilter(AuthUtil authUtil, AuthProperties authProperties) { this.authUtil authUtil; this.authProperties authProperties; } Override public MonoVoid filter(ServerWebExchange exchange, GatewayFilterChain chain) { //

获取请求request信息 ServerHttpRequest request exchange.getRequest(); String method request.getMethodValue(); String path request.getPath().toString(); String antPath method : path; //

判断是否是无需登录的路径 if(isExcludePath(antPath)){ // 直接放行 return chain.filter(exchange); } //

尝试获取用户信息 ListString authHeaders exchange.getRequest().getHeaders().get(AUTHORIZATION_HEADER); String token authHeaders null ? : authHeaders.get(

; RLoginUserDTO r authUtil.parseToken(token); //

如果用户是登录状态尝试更新请求头传递用户信息 if(r.success()){ exchange.mutate() .request(builder - builder.header(USER_HEADER, r.getData().getUserId().toString())) .build(); } //

校验权限 authUtil.checkAuth(antPath, r); //

放行 return chain.filter(exchange); } private boolean isExcludePath(String antPath) { for (String pathPattern : authProperties.getExcludePath()) { if(antPathMatcher.match(pathPattern, antPath)){ return true; } } return false; } Override public int getOrder() { return 1000; } }

com9.1.crm.芒果浏览器-com9.1.crm.芒果浏览器应用

百度百家号客服电话人工服务

123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123 123