修正 knife4j 文档拦截问题
登录基本完成调整 JWT 令牌时间为一周
This commit is contained in:
parent
ae2a2cdab6
commit
ab338be7a9
@ -14,7 +14,7 @@ import java.util.Date;
|
||||
*/
|
||||
public class JwtHelper {
|
||||
|
||||
private static final long tokenExpiration = 5 * 60 * 1000;
|
||||
private static final long tokenExpiration = 7 * 60 * 60 * 1000;
|
||||
private static final String tokenSignKey = "xlcs";
|
||||
|
||||
public static String createToken(Long userId, String userName) {
|
||||
|
@ -3,6 +3,7 @@ package com.yovinchen.xlcs.common.auth;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@ -27,4 +28,12 @@ public class LoginMvcConfigurerAdapter extends WebMvcConfigurationSupport {
|
||||
.excludePathPatterns("/api/user/weixin/wxLogin/*", "/api/user/h5/login/*");
|
||||
super.addInterceptors(registry);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/**")
|
||||
.addResourceLocations("classpath:/META-INF/resources/");
|
||||
super.addResourceHandlers(registry);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -84,18 +84,18 @@ public class Swagger2Config {
|
||||
private ApiInfo webApiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("网站-API文档")
|
||||
.description("本文档描述了尚上优选网站微服务接口定义")
|
||||
.description("本文档描述了小鹿商城网站微服务接口定义")
|
||||
.version("1.0")
|
||||
.contact(new Contact("yovinchen", "http://yovinchen.com", "yovinchen"))
|
||||
.contact(new Contact("yovinchen", "http://xlcs.hhdxw.top", "gzh298255@gmail.com"))
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo adminApiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("后台管理系统-API文档")
|
||||
.description("本文档描述了尚上优选后台系统服务接口定义")
|
||||
.description("本文档描述了小鹿商城后台系统服务接口定义")
|
||||
.version("1.0")
|
||||
.contact(new Contact("yovinchen", "http://yovinchen.com", "yovinchen"))
|
||||
.contact(new Contact("yovinchen", "http://yovinchen.com", "gzh298255@gmail.com"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user