管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2023-02-10 9b6fc58ae37b2745310e6942af1a4dae51a82c56
src/main/java/com/lf/server/helper/WebHelper.java
@@ -5,6 +5,8 @@
import com.lf.server.entity.all.ResponseMsg;
import com.lf.server.entity.all.SettingData;
import com.lf.server.entity.all.StaticData;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
@@ -31,6 +33,8 @@
    private final static String UNKNOWN = "unknown";
    private final static String COMMA = ",";
    private final static Log log = LogFactory.getLog(WebHelper.class);
    /**
     * 获取GUID
@@ -334,4 +338,17 @@
        outputStream.close();
        fileInputStream.close();
    }
    /**
     * 执行命令
     *
     * @param cmd 命令
     */
    public static void exec(String cmd) {
        try {
            Runtime.getRuntime().exec(cmd);
        } catch (Exception ex) {
            log.error(ex.getMessage(), ex);
        }
    }
}