wisdomisite-java/src/main/java/com/zhgd/xmgl/util/ProfileJudgeUtil.java

52 lines
926 B
Java
Raw Normal View History

2023-03-24 14:57:54 +08:00
package com.zhgd.xmgl.util;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
/**
* 环境判断
*/
@Component
public class ProfileJudgeUtil {
@Value("${spring.profiles.active}")
private String activeProfile;
/**
* 是否金林湾生产环境
*
* @return
*/
2023-03-29 13:54:23 +08:00
public boolean isJlwProd() {
return "ljw".equals(activeProfile);
2023-03-24 17:32:22 +08:00
}
/**
* 是否三江本地环境
*
* @return
*/
2023-03-29 13:54:23 +08:00
public boolean isSjjtGsxDev() {
return "sjjt-gsx".equals(activeProfile);
2023-03-24 14:57:54 +08:00
}
2023-03-24 17:32:22 +08:00
/**
* 是否中建四局生产环境
*
* @return
*/
2023-03-29 13:54:23 +08:00
public boolean isZjsjProd() {
return "zjsj".equals(activeProfile);
}
/**
* 是否云联万物生产环境
*
* @return
*/
public boolean isYlwwProd() {
return "ylww".equals(activeProfile);
2023-03-24 17:32:22 +08:00
}
2023-03-24 14:57:54 +08:00
}