|
@@ -33,4 +33,24 @@ public class StartRunning implements CommandLineRunner {
|
|
|
authInfoService.appInfoInit();
|
|
|
log.info("服务器启动时执行 end");
|
|
|
}
|
|
|
+
|
|
|
+// public static void main(String[] args) {
|
|
|
+// BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
|
|
|
+// //加密所需的salt(盐)
|
|
|
+// textEncryptor.setPassword("NFf5S9aVEmrEzJ5M3L6W1");
|
|
|
+// //要加密的数据(数据库的用户名或密码)
|
|
|
+// String username = textEncryptor.encrypt("root");
|
|
|
+// String password = textEncryptor.encrypt("123456789");
|
|
|
+// String redisPassword = textEncryptor.encrypt("qmth87863577");
|
|
|
+// System.out.println("username:" + username);
|
|
|
+// System.out.println("password:" + password);
|
|
|
+// System.out.println("redisPassword:" + redisPassword);
|
|
|
+//
|
|
|
+// String usernameDecrypt = textEncryptor.decrypt("vfaatAlDIcsdgGug2iATvQ==");
|
|
|
+// String passwordDecrypt = textEncryptor.decrypt("BfDtvzvWkywnFGKnxelLAMVaxyFl+Sle");
|
|
|
+// String redisPasswordDecrypt = textEncryptor.decrypt("54A9TS0Lw/36A2wI2sCjbSxR5lhJRlvd");
|
|
|
+// System.out.println("usernameDecrypt:" + usernameDecrypt);
|
|
|
+// System.out.println("passwordDecrypt:" + passwordDecrypt);
|
|
|
+// System.out.println("redisPasswordDecrypt:" + redisPasswordDecrypt);
|
|
|
+// }
|
|
|
}
|