From ed839dde6356fd524debb2ddfd95b9a4a0f5a91d Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Fri, 7 Jul 2023 11:18:02 +0900 Subject: [PATCH] =?UTF-8?q?Java=20config=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/foundation/boot/CommonConfig.java | 10 ---------- .../xit/foundation/boot/FoundationApplication.java | 2 +- .../java/cokr/xit/foundation/boot/FoundationTest.java | 2 ++ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/main/java/cokr/xit/foundation/boot/CommonConfig.java b/src/main/java/cokr/xit/foundation/boot/CommonConfig.java index cbe96a5..b058a61 100644 --- a/src/main/java/cokr/xit/foundation/boot/CommonConfig.java +++ b/src/main/java/cokr/xit/foundation/boot/CommonConfig.java @@ -19,22 +19,12 @@ import org.springframework.web.servlet.i18n.SessionLocaleResolver; import com.fasterxml.jackson.core.JsonParser.Feature; import com.fasterxml.jackson.databind.ObjectMapper; -import cokr.xit.foundation.ApplicationContainer; - /**전자정부 프레임웤과 xit foundation을 사용하는 애플리케이션의 공통 Bean들을 설정한다. * @author mjkhan */ @Configuration @ComponentScan(basePackages = "cokr.xit") public class CommonConfig { - /**ApplicationContainer를 반환한다. - * @return ApplicationContainer - */ - @Bean - public ApplicationContainer applicationContainer() { - return new ApplicationContainer(); - } - /**AntPathMatcher를 반환한다. * @return AntPathMatcher */ diff --git a/src/main/java/cokr/xit/foundation/boot/FoundationApplication.java b/src/main/java/cokr/xit/foundation/boot/FoundationApplication.java index 7cb97f0..3045ba0 100644 --- a/src/main/java/cokr/xit/foundation/boot/FoundationApplication.java +++ b/src/main/java/cokr/xit/foundation/boot/FoundationApplication.java @@ -13,7 +13,6 @@ import org.springframework.test.context.ContextConfiguration; * @author mjkhan */ @SpringBootApplication -@ContextConfiguration("classpath:spring/context-*.xml") @ImportAutoConfiguration({ CommonConfig.class, ServletConfig.class, @@ -21,4 +20,5 @@ import org.springframework.test.context.ContextConfiguration; DatasourceConfig.class, TransactionConfig.class, }) +@ContextConfiguration("classpath:spring/context-*.xml") public class FoundationApplication {} diff --git a/src/main/java/cokr/xit/foundation/boot/FoundationTest.java b/src/main/java/cokr/xit/foundation/boot/FoundationTest.java index 74fff86..836d4b6 100644 --- a/src/main/java/cokr/xit/foundation/boot/FoundationTest.java +++ b/src/main/java/cokr/xit/foundation/boot/FoundationTest.java @@ -6,6 +6,7 @@ import java.util.stream.Stream; import javax.annotation.Resource; import org.junit.jupiter.api.extension.ExtendWith; +import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTestContextBootstrapper; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.BootstrapWith; @@ -24,6 +25,7 @@ import cokr.xit.foundation.test.TestMapper; * * @author mjkhan */ +@SpringBootTest @ExtendWith(SpringExtension.class) @BootstrapWith(SpringBootTestContextBootstrapper.class) @ActiveProfiles("test")