时间修改,Happy new year

This commit is contained in:
taozi
2022-01-03 16:43:31 +08:00
parent afbbbc6f6b
commit 6fdb5f922a
734 changed files with 777 additions and 736 deletions

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,6 +1,6 @@
/*
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/
@ -26,9 +26,14 @@ import springfox.documentation.schema.AlternateTypeRule;
import springfox.documentation.schema.AlternateTypeRuleConvention;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
import springfox.documentation.service.Contact;
import springfox.documentation.service.Parameter;
import springfox.documentation.service.SecurityReference;
import springfox.documentation.service.SecurityScheme;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spi.service.contexts.SecurityContext;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@ -86,7 +91,10 @@ public class SwaggerConfig {
.apis(RequestHandlerSelectors.basePackage("co.yixiang.modules"))
.paths(PathSelectors.regex("/error.*").negate())
.build()
.globalOperationParameters(pars);
.globalOperationParameters(pars)
//添加登陆认证
.securitySchemes(securitySchemes())
.securityContexts(securityContexts());
}
private ApiInfo apiInfo() {
@ -99,6 +107,39 @@ public class SwaggerConfig {
.build();
}
private List<SecurityScheme> securitySchemes() {
//设置请求头信息
List<SecurityScheme> securitySchemes = new ArrayList<>();
ApiKey apiKey = new ApiKey(tokenHeader, tokenHeader, "header");
securitySchemes.add(apiKey);
return securitySchemes;
}
private List<SecurityContext> securityContexts() {
//设置需要登录认证的路径
List<SecurityContext> securityContexts = new ArrayList<>();
// ^(?!auth).*$ 表示所有包含auth的接口不需要使用securitySchemes即不需要带token
// ^标识开始 ()里是一子表达式 ?!/auth表示匹配不是/auth的位置匹配上则添加请求头注意路径已/开头 .表示任意字符 *表示前面的字符匹配多次 $标识结束
securityContexts.add(getContextByPath());
return securityContexts;
}
private SecurityContext getContextByPath() {
return SecurityContext.builder()
.securityReferences(defaultAuth())
.forPaths(PathSelectors.regex("^(?!/auth).*$"))
.build();
}
private List<SecurityReference> defaultAuth() {
List<SecurityReference> securityReferences = new ArrayList<>();
AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything");
AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
authorizationScopes[0] = authorizationScope;
securityReferences.add(new SecurityReference(tokenHeader, authorizationScopes));
return securityReferences;
}
}
/**

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
* 注意:
* 本软件为www.yixiang.co开发研制未经购买不得使用

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/

View File

@ -1,5 +1,5 @@
/**
* Copyright (C) 2018-2021
* Copyright (C) 2018-2022
* All rights reserved, Designed By www.yixiang.co
*/