Commit 280b09c2 authored by 赵啸非's avatar 赵啸非

添加门户license验证接口

parent 782b92f3
...@@ -109,6 +109,9 @@ public class CipherController { ...@@ -109,6 +109,9 @@ public class CipherController {
String fileEncode = EncodeUtil.getEncode(targetFilePath, true); String fileEncode = EncodeUtil.getEncode(targetFilePath, true);
List<String> zipFileNames = ZipUtil.listFileNames(ZipUtil.toZipFile(new File(targetFilePath), Charset.forName(fileEncode)), ""); List<String> zipFileNames = ZipUtil.listFileNames(ZipUtil.toZipFile(new File(targetFilePath), Charset.forName(fileEncode)), "");
log.info("zipFileNames:{}", JSON.toJSONString(zipFileNames)); log.info("zipFileNames:{}", JSON.toJSONString(zipFileNames));
if (!zipFileNames.contains("license.key") && zipFileNames.contains("license.pub"))
throw new AppException("压缩包中未包含license.key或license.pub!");
ZipUtil.unzip(targetFilePath, logPath, Charset.forName(fileEncode)); ZipUtil.unzip(targetFilePath, logPath, Charset.forName(fileEncode));
model.put("url", targetFilePath); model.put("url", targetFilePath);
model.put("fileName", file.getOriginalFilename()); model.put("fileName", file.getOriginalFilename());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment