reactor:@TenantIgnore 添加在 Controller 时,自动添加到 TenantProperties 中

This commit is contained in:
YunaiV
2025-05-05 10:23:58 +08:00
parent 9f7c9eff96
commit f92f9d2e17
2 changed files with 3 additions and 2 deletions

View File

@@ -4,6 +4,7 @@ import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
/**
@@ -30,7 +31,7 @@ public class TenantProperties {
*
* 默认情况下,每个请求需要带上 tenant-id 的请求头。但是,部分请求是无需带上的,例如说短信回调、支付回调等 Open API
*/
private Set<String> ignoreUrls = Collections.emptySet();
private Set<String> ignoreUrls = new HashSet<>();
/**
* 需要忽略多租户的表

View File

@@ -26,7 +26,7 @@ public class TenantApiImpl implements TenantApi {
}
@Override
@GetMapping // 获得租户列表的时候,无需传递租户编号
@TenantIgnore // 获得租户列表的时候,无需传递租户编号
public CommonResult<Boolean> validTenant(Long id) {
tenantService.validTenant(id);
return success(true);