Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3d2266c427
|
|
@ -42,9 +42,9 @@ public class ResourcesConfig implements WebMvcConfigurer
|
||||||
.addResourceLocations("file:" + BonusConfig.getProfile() + "/");
|
.addResourceLocations("file:" + BonusConfig.getProfile() + "/");
|
||||||
|
|
||||||
/** swagger配置 */
|
/** swagger配置 */
|
||||||
registry.addResourceHandler("/swagger-ui/**")
|
/*registry.addResourceHandler("/swagger-ui/**")
|
||||||
.addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
|
.addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/")
|
||||||
.setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic());
|
.setCacheControl(CacheControl.maxAge(5, TimeUnit.HOURS).cachePublic());*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -229,7 +230,7 @@ public class ReplayAttackFilter implements Filter {
|
||||||
long timestamp, String requestUrl, String receivedSignature) {
|
long timestamp, String requestUrl, String receivedSignature) {
|
||||||
String encryptUserId = Sm4Utils.encrypt(userId);
|
String encryptUserId = Sm4Utils.encrypt(userId);
|
||||||
String encryptSecret = Sm4Utils.encrypt(secret);
|
String encryptSecret = Sm4Utils.encrypt(secret);
|
||||||
|
System.err.println(requestUrl);
|
||||||
// 构建待签名字符串
|
// 构建待签名字符串
|
||||||
String signString = buildSignString(encryptUserId, timestamp, requestUrl, request.getMethod());
|
String signString = buildSignString(encryptUserId, timestamp, requestUrl, request.getMethod());
|
||||||
// 使用HMAC-SHA256计算签名
|
// 使用HMAC-SHA256计算签名
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue