wangrong
2026-08-30 4c949c0dc9bcae785c281c9d8125295f09810b15
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package io.dataease.utils;
 
import io.dataease.model.DeModel;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
 
@Component
public class ModelUtils {
 
    private static String modelValue;
 
    @Value("${spring.profiles.active:standalone}")
    public void setModelValue(String modelValue) {
        ModelUtils.modelValue = modelValue;
    }
 
    public static DeModel get() {
        return DeModel.valueOf(modelValue.toUpperCase());
    }
 
    public static boolean isDesktop() {
        return get() == DeModel.DESKTOP;
    }
}