Sfoglia il codice sorgente

处理监控调阅定时更改过期任务的问题

ouyang 1 anno fa
parent
commit
dc6ad62107

+ 3 - 1
soc-gateway/src/main/java/com/xunmei/gateway/config/KaptchaTextCreator.java

@@ -2,6 +2,7 @@ package com.xunmei.gateway.config;
 
 import com.google.code.kaptcha.text.impl.DefaultTextCreator;
 
+import java.security.SecureRandom;
 import java.util.Random;
 
 /**
@@ -17,7 +18,8 @@ public class KaptchaTextCreator extends DefaultTextCreator
     public String getText()
     {
         Integer result = 0;
-        Random random = new Random();
+        /*Random random = new Random();*/
+        SecureRandom random = new SecureRandom();
         int x = random.nextInt(10);
         int y = random.nextInt(10);
         StringBuilder suChinese = new StringBuilder();