Explorar o código

修改random方式

tanzhongran %!s(int64=3) %!d(string=hai) anos
pai
achega
b7c1bbe810

+ 8 - 8
abi-cloud-qr-platform-server/src/main/java/com/abi/qms/platform/infrastructure/qr/build/parent/RandomBuildCode.java

@@ -20,15 +20,15 @@ public abstract class RandomBuildCode extends BuildCode {
     /**
      * SecureRandom is preferred to Random
      */
-    private static Random rand;
+    private static Random rand = new Random();
 
-    static {
-        try {
-            rand = getInstanceStrong();
-        } catch (NoSuchAlgorithmException e) {
-            throw new BusinessException(404,"初始化随机数生成方法异常");
-        }
-    }
+//    static {
+//        try {
+//            rand = getInstanceStrong();
+//        } catch (NoSuchAlgorithmException e) {
+//            throw new BusinessException(404,"初始化随机数生成方法异常");
+//        }
+//    }
 
 
     /**