forked from kidgrow-microservices-platform

luliqiang
2020-12-31 6fb14149d62199cfcc0448c82eb2f51f9c5181de
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
package com.kidgrow.common.properties;
 
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import lombok.Getter;
import lombok.Setter;
import java.util.ArrayList;
import java.util.List;
 
/**
 * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br>
 *
 * @Description: 多租户配置<br>
 * @Project: <br>
 * @CreateDate: Created in 2020/2/4 10:03 <br>
 * @Author: <a href="4345453@kidgrow.com">liuke</a>
 */
@Setter
@Getter
@ConfigurationProperties(prefix = "kidgrow.tenant")
@RefreshScope
public class TenantProperties {
    /**
     * 是否开启多租户
     */
    private Boolean enable = false;
 
    /**
     * 默认租户类型ID
     */
    private String  tenantid="tenant_id";
 
    /**
     * 配置不进行多租户隔离的表名
     */
    private List<String> ignoreTables = new ArrayList<>();
 
 
    /**
     * 配置需要动态解析sql的表名
     */
    private List<String> dynamicTables = new ArrayList<>();
 
    /**
     * 配置不进行多租户隔离的sql
     * 需要配置mapper的全路径如:com.kidgrow.user.mapper.SysUserMapper.findList
     */
    private List<String> ignoreSqls = new ArrayList<>();
}