疯狂的狮子li
2021-09-26 770217513056ef60d5a10a705d8f75ca11d7d5af
update 修复合并异常
已修改1个文件
9 ■■■■■ 文件已修改
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SwaggerConfig.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;
    }