diff --git a/.classpath b/.classpath deleted file mode 100644 index dd4898c..0000000 --- a/.classpath +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/pom.xml b/pom.xml index 633f362..646b8b1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,6 +5,7 @@ 4.0.0 egovframework egovframe-boot-web + 5.0.0 jar egovframe-boot-web http://www.egovframe.go.kr @@ -20,7 +21,7 @@ org.egovframe.boot egovframe-boot-starter-parent - 5.0.0 + 5.0.1 diff --git a/src/main/java/egovframework/example/sample/service/EgovSampleService.java b/src/main/java/egovframework/example/sample/service/EgovSampleService.java index 74b5be6..1c8ce06 100644 --- a/src/main/java/egovframework/example/sample/service/EgovSampleService.java +++ b/src/main/java/egovframework/example/sample/service/EgovSampleService.java @@ -17,8 +17,6 @@ import java.util.List; -import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException; - /** * @Class Name : EgovSampleService.java * @Description : EgovSampleService Class @@ -61,10 +59,8 @@ public interface EgovSampleService { * 글을 조회한다. * @param vo - 조회할 정보가 담긴 SampleVO * @return 조회한 글 - * @exception BaseRuntimeException - * @exception Exception */ - SampleVO selectSample(SampleVO vo) throws BaseRuntimeException, Exception; + SampleVO selectSample(SampleVO vo); /** * 글 목록을 조회한다. diff --git a/src/main/java/egovframework/example/sample/service/impl/EgovSampleServiceImpl.java b/src/main/java/egovframework/example/sample/service/impl/EgovSampleServiceImpl.java index b541256..8bdf06d 100644 --- a/src/main/java/egovframework/example/sample/service/impl/EgovSampleServiceImpl.java +++ b/src/main/java/egovframework/example/sample/service/impl/EgovSampleServiceImpl.java @@ -101,14 +101,12 @@ public void deleteSample(SampleVO vo) { * 글을 조회한다. * @param vo - 조회할 정보가 담긴 SampleVO * @return 조회한 글 - * @exception BaseRuntimeException - * @exception Exception */ @Override - public SampleVO selectSample(SampleVO vo) throws BaseRuntimeException, Exception { + public SampleVO selectSample(SampleVO vo) { SampleVO resultVO = sampleMapper.selectSample(vo); if (resultVO == null) { - throw processException("info.nodata.msg"); + throw new BaseRuntimeException(processException("info.nodata.msg")); } return resultVO; } diff --git a/src/main/java/egovframework/example/sample/service/impl/SampleMapper.java b/src/main/java/egovframework/example/sample/service/impl/SampleMapper.java index b77683d..e55c87b 100644 --- a/src/main/java/egovframework/example/sample/service/impl/SampleMapper.java +++ b/src/main/java/egovframework/example/sample/service/impl/SampleMapper.java @@ -80,7 +80,6 @@ public interface SampleMapper { * 글 총 개수를 조회한다. * @param vo - 조회할 정보가 담긴 VO * @return 글 총 개수 - * @exception */ int selectSampleListTotCnt(SampleVO vo); diff --git a/src/main/java/egovframework/example/sample/web/EgovSampleController.java b/src/main/java/egovframework/example/sample/web/EgovSampleController.java index f20c1e9..8e438ba 100644 --- a/src/main/java/egovframework/example/sample/web/EgovSampleController.java +++ b/src/main/java/egovframework/example/sample/web/EgovSampleController.java @@ -17,7 +17,6 @@ import java.util.List; -import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException; import org.egovframe.rte.fdl.property.EgovPropertyService; import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import org.springframework.stereotype.Controller; @@ -144,11 +143,9 @@ public String addSample(@Valid @ModelAttribute SampleVO sampleVO, BindingResult * @param sampleVO - 수정할 글 정보가 담긴 VO * @param model * @return "egovSampleRegister" - * @exception BaseRuntimeException - * @exception Exception */ @PostMapping("/updateSampleView.do") - public String updateSampleView(@ModelAttribute SampleVO sampleVO, Model model) throws BaseRuntimeException, Exception { + public String updateSampleView(@ModelAttribute SampleVO sampleVO, Model model) { SampleVO detail = sampleService.selectSample(sampleVO); detail.setSearchCondition(sampleVO.getSearchCondition()); diff --git a/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTest.java b/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTest.java index 3bdacd9..d6852db 100644 --- a/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTest.java +++ b/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTest.java @@ -25,7 +25,6 @@ import java.util.Arrays; import java.util.List; -import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException; import org.egovframe.rte.fdl.idgnr.EgovIdGnrService; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; @@ -99,7 +98,7 @@ void setUp() { @Test @DisplayName("글 단건 조회 - 존재하는 글을 정상적으로 반환한다") - void selectSample_정상() throws BaseRuntimeException, Exception { + void selectSample_정상() { // given SampleVO expected = new SampleVO(); expected.setId("SAMPLE-001"); diff --git a/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTestInsertSampleTest.java b/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTestInsertSampleTest.java index 3c8a295..4b132c3 100644 --- a/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTestInsertSampleTest.java +++ b/src/test/java/egovframework/example/sample/service/impl/EgovSampleServiceImplTestInsertSampleTest.java @@ -4,7 +4,6 @@ import java.time.LocalDateTime; -import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @@ -35,7 +34,7 @@ class EgovSampleServiceImplTestInsertSampleTest { private EgovSampleService egovSampleService; @Test - void test() throws BaseRuntimeException, Exception { + void test() { // given final SampleVO sampleVO = new SampleVO(); diff --git a/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestRegisterViewTest.java b/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestRegisterViewTest.java index 4565a3c..703c6ab 100644 --- a/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestRegisterViewTest.java +++ b/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestRegisterViewTest.java @@ -9,6 +9,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; @@ -49,7 +50,7 @@ class EgovSampleControllerTestRegisterViewTest { private MockMvc mockMvc; @Test - void testAddSampleView() throws Exception { + void testAddSampleView() throws BaseRuntimeException, Exception { // given, when final String html = mockMvc.perform( @@ -72,7 +73,7 @@ void testAddSampleView() throws Exception { } @Test - void testUpdateSampleView() throws Exception { + void testUpdateSampleView() throws BaseRuntimeException, Exception { // given, when final String html = mockMvc.perform( diff --git a/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestSelectListRowNumberTest.java b/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestSelectListRowNumberTest.java index 87bc6b7..b53d74d 100644 --- a/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestSelectListRowNumberTest.java +++ b/src/test/java/egovframework/example/sample/web/EgovSampleControllerTestSelectListRowNumberTest.java @@ -9,6 +9,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.egovframe.rte.fdl.cmmn.exception.BaseRuntimeException; import org.egovframe.rte.fdl.property.impl.EgovPropertyServiceImpl; import org.egovframe.rte.ptl.mvc.tags.ui.pagination.PaginationInfo; import org.junit.jupiter.api.DisplayName; @@ -64,7 +65,7 @@ EgovPropertyServiceImpl propertiesService() { @Test @DisplayName("행 번호는 페이지 링크 묶음 크기가 아니라 페이지당 건수만큼 페이지마다 건너뛴다") - void test_행번호_페이지당건수() throws Exception { + void test_행번호_페이지당건수() throws BaseRuntimeException, Exception { // given final MvcResult mvcResult = mockMvc .perform(get("/egovSampleList.do").param("pageIndex", String.valueOf(PAGE_INDEX)))