From 96c957b851126668c6475aa39437cabb732cdc4a Mon Sep 17 00:00:00 2001 From: minuk926 Date: Wed, 25 May 2022 12:41:53 +0900 Subject: [PATCH] =?UTF-8?q?config=20:=20gradle=20com.ewerk.gradle.plugins.?= =?UTF-8?q?querydsl=20plugin=20=EC=A0=9C=EA=B1=B0=20=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20Gradle=20Annotation=20processor=EB=A5=BC=20=EC=82=AC?= =?UTF-8?q?=EC=9A=A9=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 9 +++++++++ ...tFrameworkApplicationCommandLineRunner.java | 18 ------------------ .../com/xit/core/JasyptApplicationTests.java | 2 +- 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/build.gradle b/build.gradle index 0ab0e17..f732450 100644 --- a/build.gradle +++ b/build.gradle @@ -260,6 +260,15 @@ tasks.withType(JavaCompile) { //-----------------------------------------------------------------------------------// /** clean 태스크 실행시 QClass 삭제 */ +/** + * Intellij IDEA - Build, Execution, Deployment - Build tools → Gradle 에서 ‘Build and run’ 설정값에 따라 ‘Annotation processor’ 생성물 위치가 달라짐 + * Gradle: 각 모듈별 build/generated/sources/annotationProcessor/java/main + * ‘Q생성물’에 대한 별도의 정리작업을 하지 않아도 clean 태스크로 정리 가능 + * IntellijI IDEA: 각 모듈별 src/main/generated + * Compiler Annotation procesoors 설정영향받음 + * 기존 Q클래스는 갱신되지만, 엔티티 위치가 변경되거나 삭제된 경우 Q클래스는 그대로 유지 + * Build, Execution, Deployment - Compiler -> Enable annotaion processing 활성화 필요 + */ clean { delete file('src/main/generated') // 인텔리제이 Annotation processor 생성물 생성위치 } diff --git a/src/main/java/com/xit/core/init/XitFrameworkApplicationCommandLineRunner.java b/src/main/java/com/xit/core/init/XitFrameworkApplicationCommandLineRunner.java index 8192586..646a827 100644 --- a/src/main/java/com/xit/core/init/XitFrameworkApplicationCommandLineRunner.java +++ b/src/main/java/com/xit/core/init/XitFrameworkApplicationCommandLineRunner.java @@ -27,23 +27,5 @@ public class XitFrameworkApplicationCommandLineRunner implements CommandLineRunn //System.out.println(new SCryptPasswordEncoder().encode("gnadmin")); //System.out.println(new DelegatingPasswordEncoder().encode("gnadmin", "")); //System.out.println(new Pbkdf2PasswordEncoder().encode("gnadmin")); - - String url = "jdbc:oracle:thin:@211.119.124.118:1521:bustms"; - String username = "traffic"; - String password = "xhdgkq0"; - - System.out.println(jasyptEncoding(url)); - System.out.println(jasyptEncoding(username)); - System.out.println(jasyptEncoding(password)); - } - - - private String jasyptEncoding(String value) { - - String key = "xit_jasypt_key"; - StandardPBEStringEncryptor pbeEnc = new StandardPBEStringEncryptor(); - pbeEnc.setAlgorithm("PBEWithMD5AndDES"); - pbeEnc.setPassword(key); - return pbeEnc.encrypt(value); } } diff --git a/src/test/java/com/xit/core/JasyptApplicationTests.java b/src/test/java/com/xit/core/JasyptApplicationTests.java index bd61890..6a81ba7 100644 --- a/src/test/java/com/xit/core/JasyptApplicationTests.java +++ b/src/test/java/com/xit/core/JasyptApplicationTests.java @@ -6,7 +6,7 @@ import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.ActiveProfiles; @SpringBootTest -@ActiveProfiles(value="dev") +//@ActiveProfiles(value="dev") class JasyptApplicationTests { @Test