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

pull/190/head
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 org.springframework.boot.context.properties.ConfigurationProperties;
import java.util.Collections; import java.util.Collections;
import java.util.HashSet;
import java.util.Set; import java.util.Set;
/** /**
@ -30,7 +31,7 @@ public class TenantProperties {
* *
* tenant-id Open API * 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 @Override
@GetMapping // 获得租户列表的时候,无需传递租户编号 @TenantIgnore // 获得租户列表的时候,无需传递租户编号
public CommonResult<Boolean> validTenant(Long id) { public CommonResult<Boolean> validTenant(Long id) {
tenantService.validTenant(id); tenantService.validTenant(id);
return success(true); return success(true);