We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b86e5b9 commit 50a9f12Copy full SHA for 50a9f12
1 file changed
application/src/test/java/top/cadecode/uniboot/JasyptEncryptorTest.java
@@ -0,0 +1,26 @@
1
+package top.cadecode.uniboot;
2
+
3
+import org.jasypt.encryption.StringEncryptor;
4
+import org.junit.jupiter.api.Test;
5
+import org.springframework.beans.factory.annotation.Autowired;
6
+import org.springframework.boot.test.context.SpringBootTest;
7
8
+/**
9
+ * 用于生成加密配置的测试工具
10
+ *
11
+ * @author Cade Li
12
+ * @since 2023/4/24
13
+ */
14
+@SpringBootTest
15
+public class JasyptEncryptorTest {
16
17
+ @Autowired
18
+ private StringEncryptor stringEncryptor;
19
20
+ @Test
21
+ void encrypt() {
22
+ // 执行加密前需要在配置文件中配置jasypt.encryptor.password
23
+ stringEncryptor.encrypt("string waiting encrypt");
24
+ }
25
26
+}
0 commit comments