최초 커밋!

This commit is contained in:
kangsunlee
2025-05-27 16:34:20 +09:00
parent 3b8247ecd9
commit 5a66c0542b
1445 changed files with 65703 additions and 65 deletions

View File

@@ -0,0 +1,46 @@
package app.module.core.common.util;
import static org.junit.jupiter.api.Assertions.assertEquals;
import app.module.core.config.application.util.AESEncryptUtil;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.BadPaddingException;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
@SpringBootTest
@TestPropertySource("classpath:application-override.properties")
class AESEncryptUtilTest {
static {
System.setProperty("com.amazonaws.sdk.disableEc2Metadata", "true");
}
private final String phoneNo = "01012341234";
private final String encryptedPhoneNo = "dQSU9oEA+WD1WKQZIRaR9g==";
@Autowired
AESEncryptUtil aesEncryptUtil;
@Test
@DisplayName("operate - AESEncryptUtilTest (암호화)")
void encrypt()
throws NoSuchPaddingException, InvalidKeyException, NoSuchAlgorithmException,
IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException {
assertEquals(encryptedPhoneNo, aesEncryptUtil.encrypt(phoneNo), "operate - encrypt");
}
@Test
@DisplayName("operate - AESEncryptUtilTest (복호화)")
void decrypt()
throws NoSuchPaddingException, InvalidKeyException, NoSuchAlgorithmException,
IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException {
assertEquals(phoneNo, aesEncryptUtil.decrypt(encryptedPhoneNo), "operate - decrypt");
}
}

View File

@@ -0,0 +1,11 @@
# disable JNDI lookup
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.jdbc.JndiDataSourceAutoConfiguration
spring.profiles.active=local
spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:h2:~/test;
spring.datasource.username=sa
spring.datasource.password=
spring.datasource.driver-class-name=org.h2.Driver
spring.jpa.properties.hibernate.show_sql=true
logging.level.org.hibernate.type.descriptor.sql=trace
front-app.initData.test=true