From 10d7b3239e4baec952b9ee8a3e948399916d336c Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期一, 20 十月 2025 08:23:58 +0800 Subject: [PATCH] 13 --- src/main/java/com/zy/common/properties/SystemProperties.java | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/zy/common/properties/SystemProperties.java b/src/main/java/com/zy/common/properties/SystemProperties.java index 8aaa8ef..bd926c4 100644 --- a/src/main/java/com/zy/common/properties/SystemProperties.java +++ b/src/main/java/com/zy/common/properties/SystemProperties.java @@ -15,9 +15,10 @@ public static final String SALT = "123456789qwertyu"; // 绯荤粺婵�娲荤姸鎬� (榛樿鏈縺娲�) - public static boolean SYSTEM_ACTIVATION = Boolean.FALSE; +// public static boolean SYSTEM_ACTIVATION = Boolean.FALSE; + public static boolean SYSTEM_ACTIVATION = Boolean.TRUE; - public static String getActivationCode(String fileName){ + public static String getActivationCode(String fileName) { StringBuilder activationCode = new StringBuilder(); try { FileReader f = new FileReader(fileName); @@ -37,7 +38,7 @@ return activationCode.toString(); } - public static boolean saveActivationCode(String filePath, String code){ + public static boolean saveActivationCode(String filePath, String code) { try { // 闃叉鏂囦欢寤虹珛鎴栬鍙栧け璐ワ紝鐢╟atch鎹曟崏閿欒骞舵墦鍗帮紝涔熷彲浠hrow File file = new File(filePath);// 鐩稿璺緞锛屽鏋滄病鏈夊垯瑕佸缓绔嬩竴涓柊鐨刼utput銆倀xt鏂囦欢 @@ -63,11 +64,11 @@ // 鐢熸垚婵�娲荤爜 public static void main(String[] args) { - String timeStr = "2020-08-01 17:48:35"; + String timeStr = "2021-08-01 17:48:35"; Date exprTime = DateUtils.convert(timeStr); String code = AesUtils.encrypt(DateUtils.convert(exprTime, DateUtils.yyyyMMddHHmmss), SystemProperties.SALT); - System.out.println("婵�娲荤爜锛�"+code); - System.out.println("鏈夋晥鏈熻嚦锛�"+timeStr); + System.out.println("婵�娲荤爜锛�" + code); + System.out.println("鏈夋晥鏈熻嚦锛�" + timeStr); // saveActivationCode(SysOsType.Windows.getActivationCodePath(), code); // String activationCode = getActivationCode(OSinfo.getOSname().getActivationCodePath()); // String decrypt = AesUtils.decrypt(activationCode, "123456789qwertyu"); -- Gitblit v1.9.1