mirror of https://gitee.com/stylefeng/roses
【7.0.4】更新ProjectUtil
parent
20b3522241
commit
96446cfce5
|
@ -35,6 +35,11 @@ import lombok.extern.slf4j.Slf4j;
|
|||
@Slf4j
|
||||
public class ProjectUtil {
|
||||
|
||||
/**
|
||||
* 前后端分离项目的标识
|
||||
*/
|
||||
public static Boolean SEPARATION_FLAG = null;
|
||||
|
||||
/**
|
||||
* 获取项目是否是前后端分离的,通过系统中的ErrorView来判断
|
||||
* <p>
|
||||
|
@ -45,11 +50,17 @@ public class ProjectUtil {
|
|||
* @date 2021/5/18 10:42
|
||||
*/
|
||||
public static Boolean getSeparationFlag() {
|
||||
if (SEPARATION_FLAG != null) {
|
||||
return SEPARATION_FLAG;
|
||||
}
|
||||
|
||||
try {
|
||||
Class.forName("cn.stylefeng.roses.kernel.system.integration.ErrorStaticJsonView");
|
||||
return true;
|
||||
SEPARATION_FLAG = true;
|
||||
return SEPARATION_FLAG;
|
||||
} catch (ClassNotFoundException e) {
|
||||
return false;
|
||||
SEPARATION_FLAG = false;
|
||||
return SEPARATION_FLAG;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue