liulin
2024-07-30 9509af69aff71aeb1f3b62f766e124d291c3f374
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
package com.lunhan.xxx.common.config;
 
import com.lunhan.xxx.common.util.SpringUtil;
 
/**
 * 获取系统配置 读取“config.properties”
 */
public final class SysConfig {
    public static JWTConfig jwt = SpringUtil.getBean(JWTConfig.class);
    public static JdbcSetConfig jdbc = SpringUtil.getBean(JdbcSetConfig.class);
    public static FileConfig file = SpringUtil.getBean(FileConfig.class);
    public static ApiSetConfig api = SpringUtil.getBean(ApiSetConfig.class);
 
    public static String getTokenHeader() {
        return jwt.getTokenHeader();
        //return properties.getProperty("jwt.tokenHeader", "");
    }
 
    public static String getJwtHead() {
        return jwt.getHead();
        //return properties.getProperty("jwt.tokenHead", "");
    }
 
    public static String getTJwtHeader() {
        return jwt.getTokenHeader();
        //return properties.getProperty("jwt.tokenHeader", "");
    }
 
    public static boolean isSqlLog() {
        return "true".equalsIgnoreCase(jdbc.getSqlLog());
        //return properties.getProperty("mail.sendEmail", "");
    }
 
    public static String fileUploadBasic() {
        return file.getUploadBasicPath();
    }
 
    public static String fileViewBasic() {
        return file.getFileBasicUrl();
    }
 
    public static String fileDisturbStr() {
        return file.getDisturbStr();
    }
}