|
@@ -9,6 +9,8 @@ import org.jasypt.salt.StringFixedSaltGenerator;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.springframework.test.context.ActiveProfiles;
|
|
import org.springframework.test.context.ActiveProfiles;
|
|
|
|
|
|
|
|
+import java.sql.Connection;
|
|
|
|
+import java.sql.DriverManager;
|
|
import java.time.LocalDateTime;
|
|
import java.time.LocalDateTime;
|
|
import java.time.format.DateTimeFormatter;
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
|
@@ -16,12 +18,28 @@ import java.time.format.DateTimeFormatter;
|
|
//@SpringBootTest
|
|
//@SpringBootTest
|
|
@ActiveProfiles(profiles = "dev")
|
|
@ActiveProfiles(profiles = "dev")
|
|
public class ItsOpServerApplicationTests {
|
|
public class ItsOpServerApplicationTests {
|
|
|
|
+// @Autowired
|
|
|
|
+// DefaultListableBeanFactory bf;
|
|
|
|
|
|
@Test
|
|
@Test
|
|
void encrypt() {
|
|
void encrypt() {
|
|
|
|
+// for(String n : bf.getBeanDefinitionNames()){
|
|
|
|
+// log.error("{}", n);
|
|
|
|
+// }
|
|
log.error("{}", SHA256Util.encrypt("1")); // 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
|
|
log.error("{}", SHA256Util.encrypt("1")); // 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb7875b4b
|
|
log.error("{}", SHA256Util.encrypt2("admin12#$!")); // 3de9f98e4b5b4e52ff7d78cfa3140cf23e2b33c5a3143d1b2d1048237c31593c
|
|
log.error("{}", SHA256Util.encrypt2("admin12#$!")); // 3de9f98e4b5b4e52ff7d78cfa3140cf23e2b33c5a3143d1b2d1048237c31593c
|
|
}
|
|
}
|
|
|
|
+ @Test
|
|
|
|
+ public void testConnection() {
|
|
|
|
+ try (
|
|
|
|
+ Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@115.91.94.42:1522:HANTE19C", "ptatms","ptatms");
|
|
|
|
+ ) {
|
|
|
|
+ log.info("XXXX: {}", conn);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ log.error("{}", e.getMessage());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
void reference1() {
|
|
void reference1() {
|
|
String name = "test";
|
|
String name = "test";
|
|
LocalDateTime ldt = LocalDateTime.now();
|
|
LocalDateTime ldt = LocalDateTime.now();
|