STUDY/SPRING (29) ์ธ๋ค์ผํ ๋ฆฌ์คํธํ Error : SEVERE: ์์ ์ปจํ ์ด๋๋ฅผ ์์ ์ค ์คํจํ์ต๋๋ค. SEVERE: ์์ ์ปจํ ์ด๋๋ฅผ ์์ ์ค ์คํจํ์ต๋๋ค. java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: ๊ตฌ์ฑ์์ [org.apache.catalina.webresources.StandardRoot@7ec8a38f]์(๋ฅผ) ์์ํ์ง ๋ชปํ์ต๋๋ค. at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191) at org.apache.catalina.core.ContainerBase.startInternal(ContainerB.. ERROR : org.springframework.web.util.NestedServletException org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: Optional int parameter 'club_no' is present but cannot be translated into a null value due to being declared as a primitive type. Consider declaring it as object wrapper for the corresponding primitive type. club_no๋ฅผ ๋ฐ๋๋ฐ null๋ก ๋ณํ๋จ ํด๊ฒฐ : ์ฃผ์์ค์ด๋ ์ ์ธํด์ค ๋ณ์๋ช ์ด๋ ์ผ์นํ๋์ง ํ์ธ ์์ธ ๊ด๋ฆฌ *AOP - advice : aspect์ ์ค์ ๊ตฌํ ํด๋์ค @ControllerAdvice : ์ปจํธ๋กค๋ฌ์์ ๋ฐ์ํ๋ ๋ชจ๋ ์์ธ๋ฅผ ์ฒ๋ฆฌํ๋ ๊ฐ์ฒด spring - ์๋์์ฑ ์ถ๊ฐํ๊ธฐ preferences > java > editor > templates > new name : ํธ์ถํ ์ด๋ฆ(ex.sysout) pattern : ์ค์ ์ฝ๋ ok > apply & close Spring-board 1์ค์ *๋น๋ํจ์ค ์๋ฌ spring - ํ์์ ๋ณด ์์ * ํ์ ๋ชฉ๋ก๊ฐ์ ธ์ค๊ธฐ resultType : MemberVO๋ก ๋ฆฌํดํ ๊ฑฐ์ list๋ ์ฌ๊ธฐ์ ์ค์ ํด์ค ์๋น์ค ์์ฑ * domain ํจํค์ง๋ฅผ ํจํค์ง๋ก ๋ฑ๋กํด๋จ์ mapper์ ๋๋ฉ์ธ ์ฃผ์๋ฅผ ์์จ๋ ๋จ spring - MemberController 1. @Controller @RequeestMapping("/member/*") => ๊ธฐ๋ฅ๋ณ ๊ณตํต ์ฃผ์ 2. ์คํ๋ง์์๋ URI๋ฅผ ๋ถ์ํด์ ์์ฒญ(Method)์ ๋ฐ๋ผ ์ ๋นํ ์ปจํธ๋กค๋ฌ๋ฅผ ์ฐ๊ฒฐ ํด์ค = value ๊ฐ์ด ๊ฐ์๋ RequestMethod๊ฐ ๋ค๋ฅด๋ฉด ๊ตฌ๋ถ ๊ฐ๋ฅํจ * ํ๊ธ์ฒ๋ฆฌ * ์ธ์ ๊ฐ์ด ์์ผ๋ฉด ๋ก๊ทธ์ธ ํ์ด์ง๋ก ์ด๋(jstl) / (javascript) * pageContext.request.contextPath : ๋ด ํ์ฌ ๋ฌธ์์ ์์น๋ฅผ ๊ธฐ์ค์ผ๋ก ๊ฒฝ๋ก๋ฅผ ์ธ์ SPRING - bean grape๊ฐ ์๋ฐ ๋ *bean grape์ ์๋ฌด๊ฒ๋ ์๋ฐ ๋ ์ด์ 1 2 3 4 ๋ค์