revert: file

This commit is contained in:
xingyu 2023-01-16 15:15:31 +08:00
parent 1c0d8fc1eb
commit cba69e94df
8 changed files with 23 additions and 43 deletions

View File

@ -18,7 +18,6 @@
<!-- 统一依赖管理 -->
<spring.boot.version>2.7.7</spring.boot.version>
<!-- Web 相关 -->
<springdoc.version>1.6.14</springdoc.version>
<knife4j.version>4.0.0</knife4j.version>
<servlet.versoin>2.5</servlet.versoin>
<!-- DB 相关 -->
@ -170,18 +169,6 @@
<version>${knife4j.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc.version}</version>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-security</artifactId>
<version>${springdoc.version}</version>
</dependency>
<!-- DB 相关 -->
<dependency>
<groupId>cn.iocoder.boot</groupId>

View File

@ -38,16 +38,6 @@
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>

View File

@ -4,8 +4,8 @@ import io.swagger.v3.oas.models.Components;
import io.swagger.v3.oas.models.OpenAPI;
import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import org.springdoc.core.GroupedOpenApi;
import org.springdoc.core.*;
import org.springdoc.core.customizers.OpenApiBuilderCustomizer;
import org.springdoc.core.customizers.ServerBaseUrlCustomizer;
@ -44,21 +44,16 @@ public class YudaoSwaggerAutoConfiguration {
//鉴权组件(随便起名的)
SecurityScheme securityScheme = new SecurityScheme()
.type(SecurityScheme.Type.APIKEY)
.scheme("bearer")//固定写法
.scheme("Bearer")//固定写法
.bearerFormat("JWT")
.in(SecurityScheme.In.HEADER)
.name(HttpHeaders.AUTHORIZATION);
Components components = new Components()
.addSecuritySchemes("Bearer", securityScheme);
//鉴权限制要求(随便起名的)
SecurityRequirement securityRequirement = new SecurityRequirement()
.addList(HttpHeaders.AUTHORIZATION, Arrays.asList("read", "write"));
.addSecuritySchemes("bearer", securityScheme);
return new OpenAPI()
.info(info)
.components(components)
.addSecurityItem(securityRequirement);
.components(components);
}
/**
@ -92,3 +87,4 @@ public class YudaoSwaggerAutoConfiguration {
}
}

View File

@ -6,8 +6,8 @@ import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
import com.anji.captcha.model.common.ResponseModel;
import com.anji.captcha.model.vo.CaptchaVO;
import com.anji.captcha.service.CaptchaService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
@ -22,7 +22,7 @@ import javax.servlet.http.HttpServletRequest;
*
* @author 芋道源码
*/
@Api(tags = "管理后台 - 验证码")
@Tag(name = "管理后台 - 验证码")
@RestController("adminCaptchaController")
@RequestMapping("/system/captcha")
public class CaptchaController {
@ -31,7 +31,7 @@ public class CaptchaController {
private CaptchaService captchaService;
@PostMapping({"/get"})
@ApiOperation("获得验证码")
@Operation(summary = "获得验证码")
@PermitAll
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public ResponseModel get(@RequestBody CaptchaVO data, HttpServletRequest request) {
@ -41,7 +41,7 @@ public class CaptchaController {
}
@PostMapping("/check")
@ApiOperation("校验验证码")
@Operation(summary = "校验验证码")
@PermitAll
@OperateLog(enable = false) // 避免 Post 请求被记录操作日志
public ResponseModel check(@RequestBody CaptchaVO data, HttpServletRequest request) {

View File

@ -38,6 +38,13 @@ springdoc:
show-actuator: true
swagger-ui:
path: /swagger-ui
api-docs:
path: /v3/api-docs
knife4j:
enable: true
setting:
language: zh_cn
# 工作流 Flowable 配置
flowable:

View File

@ -2,10 +2,10 @@
NODE_ENV=production
# 请求路径
VITE_BASE_URL='http://localhost:48080'
VITE_BASE_URL='http://localhost:58080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
VITE_UPLOAD_URL='http://localhost:58080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=/dev-api

View File

@ -2,10 +2,10 @@
NODE_ENV=production
# 请求路径
VITE_BASE_URL='http://localhost:48080'
VITE_BASE_URL='http://localhost:58080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
VITE_UPLOAD_URL='http://localhost:58080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=

View File

@ -2,10 +2,10 @@
NODE_ENV=production
# 请求路径
VITE_BASE_URL='http://localhost:48080'
VITE_BASE_URL='http://localhost:58080'
# 上传路径
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
VITE_UPLOAD_URL='http://localhost:58080/admin-api/infra/file/upload'
# 接口前缀
VITE_API_BASEPATH=