mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 08:13:44 +08:00 
			
		
		
		
	update 修复合并异常
This commit is contained in:
		@@ -1,7 +1,7 @@
 | 
				
			|||||||
package com.ruoyi.framework.config;
 | 
					package com.ruoyi.framework.config;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import cn.dev33.satoken.SaManager;
 | 
				
			||||||
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
 | 
					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.StringUtils;
 | 
				
			||||||
import com.ruoyi.common.utils.spring.SpringUtils;
 | 
					import com.ruoyi.common.utils.spring.SpringUtils;
 | 
				
			||||||
import com.ruoyi.framework.config.properties.SwaggerProperties;
 | 
					import com.ruoyi.framework.config.properties.SwaggerProperties;
 | 
				
			||||||
@@ -32,9 +32,6 @@ public class SwaggerConfig {
 | 
				
			|||||||
    @Autowired
 | 
					    @Autowired
 | 
				
			||||||
    private SwaggerProperties swaggerProperties;
 | 
					    private SwaggerProperties swaggerProperties;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Autowired
 | 
					 | 
				
			||||||
	private TokenProperties tokenProperties;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * 创建API
 | 
					     * 创建API
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
@@ -70,7 +67,7 @@ public class SwaggerConfig {
 | 
				
			|||||||
     */
 | 
					     */
 | 
				
			||||||
    private List<SecurityScheme> securitySchemes() {
 | 
					    private List<SecurityScheme> securitySchemes() {
 | 
				
			||||||
        List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
 | 
					        List<SecurityScheme> apiKeyList = new ArrayList<SecurityScheme>();
 | 
				
			||||||
		String header = tokenProperties.getHeader();
 | 
							String header = SaManager.getConfig().getTokenName();
 | 
				
			||||||
		apiKeyList.add(new ApiKey(header, header, In.HEADER.toValue()));
 | 
							apiKeyList.add(new ApiKey(header, header, In.HEADER.toValue()));
 | 
				
			||||||
        return apiKeyList;
 | 
					        return apiKeyList;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -96,7 +93,7 @@ public class SwaggerConfig {
 | 
				
			|||||||
        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
 | 
					        AuthorizationScope[] authorizationScopes = new AuthorizationScope[1];
 | 
				
			||||||
        authorizationScopes[0] = authorizationScope;
 | 
					        authorizationScopes[0] = authorizationScope;
 | 
				
			||||||
        List<SecurityReference> securityReferences = new ArrayList<>();
 | 
					        List<SecurityReference> securityReferences = new ArrayList<>();
 | 
				
			||||||
        securityReferences.add(new SecurityReference(tokenProperties.getHeader(), authorizationScopes));
 | 
					        securityReferences.add(new SecurityReference(SaManager.getConfig().getTokenName(), authorizationScopes));
 | 
				
			||||||
        return securityReferences;
 | 
					        return securityReferences;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user