判断项目部署环境window And linux
作者:
吴繁飞 | 来源:发表于
2020-11-20 10:46 被阅读0次public static boolean isLinux() {
return System.getProperty("os.name").toLowerCase().contains("linux");
}
public static boolean isWindows() {
return System.getProperty("os.name").toLowerCase().contains("windows");
}
uploadSealFile_LinuxPath=/home/file/sealFile
uploadSealFile_WindowsPath=E:/home/file/sealFile
if(AppCommonUtils.isLinux()){
realFilePath = properties.getProperty("uploadSealFile_LinuxPath") + "/" + realFileName;
}else if(AppCommonUtils.isWindows()){
realFilePath = properties.getProperty("uploadSealFile_WindowsPath") + "/" + realFileName;
}
本文标题:判断项目部署环境window And linux
本文链接:https://www.haomeiwen.com/subject/djkdiktx.html
网友评论