reactor:@TenantIgnore 添加在 Controller 时,自动添加到 TenantProperties 中
parent
9f7c9eff96
commit
f92f9d2e17
|
@ -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<>();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 需要忽略多租户的表
|
* 需要忽略多租户的表
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue