From 770217513056ef60d5a10a705d8f75ca11d7d5af Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期日, 26 九月 2021 17:18:09 +0800 Subject: [PATCH] update 修复合并异常 --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java index 4da3b99..76d1076 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java @@ -1,7 +1,7 @@ package com.ruoyi.framework.config; +import cn.dev33.satoken.SaManager; import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; -import com.ruoyi.common.properties.TokenProperties; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.framework.config.properties.SwaggerProperties; @@ -31,9 +31,6 @@ @Autowired private SwaggerProperties swaggerProperties; - - @Autowired - private TokenProperties tokenProperties; /** * 鍒涘缓API @@ -70,7 +67,7 @@ */ private List<SecurityScheme> securitySchemes() { List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>(); - String header = tokenProperties.getHeader(); + String header = SaManager.getConfig().getTokenName(); apiKeyList.add(new ApiKey(header, header, In.HEADER.toValue())); return apiKeyList; } @@ -96,7 +93,7 @@ AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; authorizationScopes[0] = authorizationScope; List<SecurityReference> securityReferences = new ArrayList<>(); - securityReferences.add(new SecurityReference(tokenProperties.getHeader(), authorizationScopes)); + securityReferences.add(new SecurityReference(SaManager.getConfig().getTokenName(), authorizationScopes)); return securityReferences; } -- Gitblit v1.9.3