|
@@ -7,6 +7,7 @@ import com.simuwang.base.common.util.DateUtils;
|
|
import com.simuwang.base.pojo.dto.MailboxInfoDTO;
|
|
import com.simuwang.base.pojo.dto.MailboxInfoDTO;
|
|
import com.simuwang.daq.service.EmailParseApiService;
|
|
import com.simuwang.daq.service.EmailParseApiService;
|
|
import com.simuwang.daq.service.EmailParseService;
|
|
import com.simuwang.daq.service.EmailParseService;
|
|
|
|
+import org.jasypt.util.text.BasicTextEncryptor;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
@@ -66,12 +67,13 @@ public class ApplicationTest {
|
|
|
|
|
|
@Test
|
|
@Test
|
|
public void testDateFormat() {
|
|
public void testDateFormat() {
|
|
- ArrayList<String> list = ListUtil.toList("20240705", "2024年07月05日", "2024年7月5日", "2024-07-05", "2024-7-5", "2024/07/05", "2024/7/5", "20240712",
|
|
|
|
- "2024年07月12日", "2024年7月12日", "2024-07-12", "2024-7-12", "2024/07/12", "2024/7/12", "20241005", "2024年10月05日", "2024年10月5日", "2024-10-05", "2024-10-5", "2024/10/05", "2024/10/5");
|
|
|
|
- for (String dateString : list) {
|
|
|
|
- String date = DateUtils.stringToDate(dateString);
|
|
|
|
- System.out.println(dateString + ": -> " + date);
|
|
|
|
- }
|
|
|
|
|
|
+ String input = "IXO6gLlmQgiuvHZ";
|
|
|
|
+ BasicTextEncryptor textEncryptor = new BasicTextEncryptor();
|
|
|
|
+ textEncryptor.setPassword("qwertyuiopasdfghjklzxcvbnm1234567890qwertyuiopasdfghjklzxcvbnm12"); // 用您自己的密钥替换"yourSecretKey"
|
|
|
|
+ String encryptedString = textEncryptor.encrypt(input);
|
|
|
|
+ String decrypt = textEncryptor.decrypt(encryptedString);
|
|
|
|
+ System.out.println("加密后的字符串为: " + encryptedString);
|
|
|
|
+ System.out.println("解密后的字符串为: " + decrypt);
|
|
}
|
|
}
|
|
|
|
|
|
private MailboxInfoDTO buildMailbox(String account, String pwd) {
|
|
private MailboxInfoDTO buildMailbox(String account, String pwd) {
|