From 21f2a7eab57eaedba390d2d815414bf16ce0e7b6 Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 15:20:42 +0900 Subject: [PATCH 01/13] =?UTF-8?q?feat:=20=ED=85=8C=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=ED=99=98=EA=B2=BD=20lombok=20=EC=84=A4=EC=A0=95=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build.gradle b/build.gradle index 9b53de63..42e32001 100644 --- a/build.gradle +++ b/build.gradle @@ -40,6 +40,10 @@ dependencies { // validation implementation 'org.springframework.boot:spring-boot-starter-validation' + // 테스트 환경 lombok 설정 + testImplementation 'org.projectlombok:lombok' + testCompileOnly 'org.projectlombok:lombok' + testAnnotationProcessor 'org.projectlombok:lombok' } tasks.named('test') { From 0c31ad894a40b3f0eb41422e3c4b175f72c100fe Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 15:21:07 +0900 Subject: [PATCH 02/13] =?UTF-8?q?feat:=20application.yml=EC=97=90=20token?= =?UTF-8?q?=20=EA=B4=80=EB=A0=A8=20yml=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index e22b453a..47a40d7c 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -6,10 +6,10 @@ spring: config: activate: on-profile: prod - import: classpath:sub/application-db.yml + import: classpath:sub/application-db.yml, classpath:sub/application-token.yml --- spring: config: activate: on-profile: dev - import: classpath:dev/application-dev.yml + import: classpath:dev/application-dev.yml, classpath:sub/application-token.yml From 8c6cc59ff8b78b759e68fda880ea2904e2163273 Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 15:21:23 +0900 Subject: [PATCH 03/13] =?UTF-8?q?feat:=20=EC=99=B8=EB=B6=80=20=ED=86=A0?= =?UTF-8?q?=ED=81=B0=EC=9D=84=20=EA=B4=80=EB=A6=AC=ED=95=98=EB=8A=94=20Tok?= =?UTF-8?q?enProvider=20bean=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global/config/TokenProvider.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/main/java/com/ray/pominowner/global/config/TokenProvider.java diff --git a/src/main/java/com/ray/pominowner/global/config/TokenProvider.java b/src/main/java/com/ray/pominowner/global/config/TokenProvider.java new file mode 100644 index 00000000..e4623d54 --- /dev/null +++ b/src/main/java/com/ray/pominowner/global/config/TokenProvider.java @@ -0,0 +1,20 @@ +package com.ray.pominowner.global.config; + +import lombok.Getter; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Getter +@Component +public class TokenProvider { + + private final String businessNumberServiceKey; + private final String businessNumberHeaderAuthKey; + + public TokenProvider(@Value("${api.token.business.query:''}") String businessNumberServiceKey, + @Value("${api.token.business.header:''}") String businessNumberHeaderAuthKey) { + this.businessNumberServiceKey = businessNumberServiceKey; + this.businessNumberHeaderAuthKey = businessNumberHeaderAuthKey; + } + +} From c09ddcd4f6728650834501f250bffb40e87fcb8a Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 15:21:32 +0900 Subject: [PATCH 04/13] =?UTF-8?q?test:=20token=EC=9D=84=20=EC=98=AC?= =?UTF-8?q?=EB=B0=94=EB=A5=B4=EA=B2=8C=20=EA=B0=80=EC=A7=80=EA=B3=A0=20?= =?UTF-8?q?=EC=98=A4=EB=8A=94=EC=A7=80=20=EA=B2=80=EC=A6=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global/config/TokenProviderTest.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java diff --git a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java new file mode 100644 index 00000000..79d8dc48 --- /dev/null +++ b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java @@ -0,0 +1,29 @@ +package com.ray.pominowner.global.config; + +import lombok.extern.slf4j.Slf4j; +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 static org.assertj.core.api.Assertions.assertThat; + +@Slf4j +@SpringBootTest +class TokenProviderTest { + + @Autowired + private TokenProvider tokenProvider; + + @Test + @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") + void successGetCorrectToken() { + String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); + String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); + log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); + + assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); + assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); + } + +} From c1355041b152151e08f8fe833196cccee784ead6 Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 15:36:59 +0900 Subject: [PATCH 05/13] =?UTF-8?q?feat:=20submodule=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/sub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/sub b/src/main/resources/sub index 9680f7c8..7d515ad5 160000 --- a/src/main/resources/sub +++ b/src/main/resources/sub @@ -1 +1 @@ -Subproject commit 9680f7c8d4ca383894626153d055ac5dcebd12fc +Subproject commit 7d515ad556e7b8a51add6b86502ac135dc6b6d4b From b95bf24b89c12c27cf6d180436512bb326b36132 Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 15:39:58 +0900 Subject: [PATCH 06/13] =?UTF-8?q?feat:=20submodule=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/sub | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/sub b/src/main/resources/sub index 7d515ad5..3fee6faa 160000 --- a/src/main/resources/sub +++ b/src/main/resources/sub @@ -1 +1 @@ -Subproject commit 7d515ad556e7b8a51add6b86502ac135dc6b6d4b +Subproject commit 3fee6faa9c36eabdef5717e3a86648d21408d810 From 9aef43386f4c30e53e745636310e5513e9beb750 Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 15:55:57 +0900 Subject: [PATCH 07/13] test: test --- .../global/config/TokenProviderTest.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java index 79d8dc48..b43b6bd7 100644 --- a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java +++ b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java @@ -1,29 +1,29 @@ -package com.ray.pominowner.global.config; - -import lombok.extern.slf4j.Slf4j; -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 static org.assertj.core.api.Assertions.assertThat; - -@Slf4j -@SpringBootTest -class TokenProviderTest { - - @Autowired - private TokenProvider tokenProvider; - - @Test - @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") - void successGetCorrectToken() { - String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); - String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); - log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); - - assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); - assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); - } - -} +//package com.ray.pominowner.global.config; +// +//import lombok.extern.slf4j.Slf4j; +//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 static org.assertj.core.api.Assertions.assertThat; +// +//@Slf4j +//@SpringBootTest +//class TokenProviderTest { +// +// @Autowired +// private TokenProvider tokenProvider; +// +// @Test +// @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") +// void successGetCorrectToken() { +// String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); +// String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); +// log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); +// +// assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); +// assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); +// } +// +//} From 9af1d80c4f7f2f45cfa6957a4c6569b81b88983e Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 16:07:44 +0900 Subject: [PATCH 08/13] test: test --- .../global/config/TokenProviderTest.java | 58 +++++++++---------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java index b43b6bd7..79d8dc48 100644 --- a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java +++ b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java @@ -1,29 +1,29 @@ -//package com.ray.pominowner.global.config; -// -//import lombok.extern.slf4j.Slf4j; -//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 static org.assertj.core.api.Assertions.assertThat; -// -//@Slf4j -//@SpringBootTest -//class TokenProviderTest { -// -// @Autowired -// private TokenProvider tokenProvider; -// -// @Test -// @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") -// void successGetCorrectToken() { -// String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); -// String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); -// log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); -// -// assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); -// assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); -// } -// -//} +package com.ray.pominowner.global.config; + +import lombok.extern.slf4j.Slf4j; +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 static org.assertj.core.api.Assertions.assertThat; + +@Slf4j +@SpringBootTest +class TokenProviderTest { + + @Autowired + private TokenProvider tokenProvider; + + @Test + @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") + void successGetCorrectToken() { + String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); + String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); + log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); + + assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); + assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); + } + +} From 48c034dab35085981747c2f262a180161b57a203 Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 17:12:59 +0900 Subject: [PATCH 09/13] =?UTF-8?q?chore:=20build.gradle=20=EB=B0=8F=20appli?= =?UTF-8?q?cation.yml=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 1 - src/main/resources/application.yml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index 42e32001..0e7aec4f 100644 --- a/build.gradle +++ b/build.gradle @@ -42,7 +42,6 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-validation' // 테스트 환경 lombok 설정 testImplementation 'org.projectlombok:lombok' - testCompileOnly 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 47a40d7c..9b461c32 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -6,10 +6,10 @@ spring: config: activate: on-profile: prod - import: classpath:sub/application-db.yml, classpath:sub/application-token.yml + import: sub/application-db.yml, sub/application-token.yml --- spring: config: activate: on-profile: dev - import: classpath:dev/application-dev.yml, classpath:sub/application-token.yml + import: dev/application-dev.yml, sub/application-token.yml From 9ab5f060f449f5755c4302f07cd917b3bfae859b Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 17:21:06 +0900 Subject: [PATCH 10/13] chore: test --- .../global/config/TokenProvider.java | 40 ++++++------- src/main/resources/application.yml | 3 +- .../global/config/TokenProviderTest.java | 58 +++++++++---------- 3 files changed, 51 insertions(+), 50 deletions(-) diff --git a/src/main/java/com/ray/pominowner/global/config/TokenProvider.java b/src/main/java/com/ray/pominowner/global/config/TokenProvider.java index e4623d54..0aa3de25 100644 --- a/src/main/java/com/ray/pominowner/global/config/TokenProvider.java +++ b/src/main/java/com/ray/pominowner/global/config/TokenProvider.java @@ -1,20 +1,20 @@ -package com.ray.pominowner.global.config; - -import lombok.Getter; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Component; - -@Getter -@Component -public class TokenProvider { - - private final String businessNumberServiceKey; - private final String businessNumberHeaderAuthKey; - - public TokenProvider(@Value("${api.token.business.query:''}") String businessNumberServiceKey, - @Value("${api.token.business.header:''}") String businessNumberHeaderAuthKey) { - this.businessNumberServiceKey = businessNumberServiceKey; - this.businessNumberHeaderAuthKey = businessNumberHeaderAuthKey; - } - -} +//package com.ray.pominowner.global.config; +// +//import lombok.Getter; +//import org.springframework.beans.factory.annotation.Value; +//import org.springframework.stereotype.Component; +// +//@Getter +//@Component +//public class TokenProvider { +// +// private final String businessNumberServiceKey; +// private final String businessNumberHeaderAuthKey; +// +// public TokenProvider(@Value("${api.token.business.query:''}") String businessNumberServiceKey, +// @Value("${api.token.business.header:''}") String businessNumberHeaderAuthKey) { +// this.businessNumberServiceKey = businessNumberServiceKey; +// this.businessNumberHeaderAuthKey = businessNumberHeaderAuthKey; +// } +// +//} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 9b461c32..d7ae1ce8 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -7,9 +7,10 @@ spring: activate: on-profile: prod import: sub/application-db.yml, sub/application-token.yml + --- spring: config: activate: on-profile: dev - import: dev/application-dev.yml, sub/application-token.yml + import: dev/application-dev.yml diff --git a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java index 79d8dc48..b43b6bd7 100644 --- a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java +++ b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java @@ -1,29 +1,29 @@ -package com.ray.pominowner.global.config; - -import lombok.extern.slf4j.Slf4j; -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 static org.assertj.core.api.Assertions.assertThat; - -@Slf4j -@SpringBootTest -class TokenProviderTest { - - @Autowired - private TokenProvider tokenProvider; - - @Test - @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") - void successGetCorrectToken() { - String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); - String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); - log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); - - assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); - assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); - } - -} +//package com.ray.pominowner.global.config; +// +//import lombok.extern.slf4j.Slf4j; +//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 static org.assertj.core.api.Assertions.assertThat; +// +//@Slf4j +//@SpringBootTest +//class TokenProviderTest { +// +// @Autowired +// private TokenProvider tokenProvider; +// +// @Test +// @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") +// void successGetCorrectToken() { +// String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); +// String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); +// log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); +// +// assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); +// assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); +// } +// +//} From 40840e6868ebbd1d067320fa9dd1699bedd6eada Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 17:25:00 +0900 Subject: [PATCH 11/13] =?UTF-8?q?chore:=20submodule=20=EB=AC=B8=EC=A0=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global/config/TokenProvider.java | 40 ++++++------- src/main/resources/application.yml | 2 +- src/main/resources/sub | 2 +- .../global/config/TokenProviderTest.java | 58 +++++++++---------- 4 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/main/java/com/ray/pominowner/global/config/TokenProvider.java b/src/main/java/com/ray/pominowner/global/config/TokenProvider.java index 0aa3de25..e4623d54 100644 --- a/src/main/java/com/ray/pominowner/global/config/TokenProvider.java +++ b/src/main/java/com/ray/pominowner/global/config/TokenProvider.java @@ -1,20 +1,20 @@ -//package com.ray.pominowner.global.config; -// -//import lombok.Getter; -//import org.springframework.beans.factory.annotation.Value; -//import org.springframework.stereotype.Component; -// -//@Getter -//@Component -//public class TokenProvider { -// -// private final String businessNumberServiceKey; -// private final String businessNumberHeaderAuthKey; -// -// public TokenProvider(@Value("${api.token.business.query:''}") String businessNumberServiceKey, -// @Value("${api.token.business.header:''}") String businessNumberHeaderAuthKey) { -// this.businessNumberServiceKey = businessNumberServiceKey; -// this.businessNumberHeaderAuthKey = businessNumberHeaderAuthKey; -// } -// -//} +package com.ray.pominowner.global.config; + +import lombok.Getter; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Getter +@Component +public class TokenProvider { + + private final String businessNumberServiceKey; + private final String businessNumberHeaderAuthKey; + + public TokenProvider(@Value("${api.token.business.query:''}") String businessNumberServiceKey, + @Value("${api.token.business.header:''}") String businessNumberHeaderAuthKey) { + this.businessNumberServiceKey = businessNumberServiceKey; + this.businessNumberHeaderAuthKey = businessNumberHeaderAuthKey; + } + +} diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index d7ae1ce8..79ed108f 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -13,4 +13,4 @@ spring: config: activate: on-profile: dev - import: dev/application-dev.yml + import: dev/application-dev.yml, sub/application-token.yml diff --git a/src/main/resources/sub b/src/main/resources/sub index 3fee6faa..6f907574 160000 --- a/src/main/resources/sub +++ b/src/main/resources/sub @@ -1 +1 @@ -Subproject commit 3fee6faa9c36eabdef5717e3a86648d21408d810 +Subproject commit 6f907574faa8a020cd7806c2e9771678e7eb0470 diff --git a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java index b43b6bd7..79d8dc48 100644 --- a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java +++ b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java @@ -1,29 +1,29 @@ -//package com.ray.pominowner.global.config; -// -//import lombok.extern.slf4j.Slf4j; -//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 static org.assertj.core.api.Assertions.assertThat; -// -//@Slf4j -//@SpringBootTest -//class TokenProviderTest { -// -// @Autowired -// private TokenProvider tokenProvider; -// -// @Test -// @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") -// void successGetCorrectToken() { -// String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); -// String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); -// log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); -// -// assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); -// assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); -// } -// -//} +package com.ray.pominowner.global.config; + +import lombok.extern.slf4j.Slf4j; +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 static org.assertj.core.api.Assertions.assertThat; + +@Slf4j +@SpringBootTest +class TokenProviderTest { + + @Autowired + private TokenProvider tokenProvider; + + @Test + @DisplayName("yml에 설정된 올바른 토큰을 가져올 수 있다.") + void successGetCorrectToken() { + String businessNumberServiceKey = tokenProvider.getBusinessNumberServiceKey(); + String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); + log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); + + assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); + assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); + } + +} From 935043a015c8bc080ae04ae5f43162c8699a688b Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 17:29:55 +0900 Subject: [PATCH 12/13] =?UTF-8?q?feat:=20build.gradle=20=ED=85=8C=EC=8A=A4?= =?UTF-8?q?=ED=8A=B8=20=EC=BB=B4=ED=8C=8C=EC=9D=BC=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.gradle | 1 + 1 file changed, 1 insertion(+) diff --git a/build.gradle b/build.gradle index 0e7aec4f..42e32001 100644 --- a/build.gradle +++ b/build.gradle @@ -42,6 +42,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-validation' // 테스트 환경 lombok 설정 testImplementation 'org.projectlombok:lombok' + testCompileOnly 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } From ef56a3623c51565f7e5917fc943a486ed44fd02b Mon Sep 17 00:00:00 2001 From: junho Date: Wed, 13 Sep 2023 17:43:20 +0900 Subject: [PATCH 13/13] =?UTF-8?q?refactor:=20=EB=B6=88=ED=95=84=EC=9A=94?= =?UTF-8?q?=ED=95=9C=20=EA=B2=80=EC=A6=9D=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/ray/pominowner/global/config/TokenProviderTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java index 79d8dc48..b3d0af91 100644 --- a/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java +++ b/src/test/java/com/ray/pominowner/global/config/TokenProviderTest.java @@ -22,8 +22,8 @@ void successGetCorrectToken() { String businessNumberHeaderAuthKey = tokenProvider.getBusinessNumberHeaderAuthKey(); log.info("businessNumberServiceKey: {}, businessNumberHeaderAuthKey: {}", businessNumberServiceKey, businessNumberHeaderAuthKey); - assertThat(businessNumberServiceKey).isNotBlank().isNotEqualTo("null"); - assertThat(businessNumberHeaderAuthKey).isNotBlank().isNotEqualTo("null"); + assertThat(businessNumberServiceKey).isNotBlank(); + assertThat(businessNumberHeaderAuthKey).isNotBlank(); } }