์คํ๋ง Spring/๐งถ ์คํ๋ง ํ๋ ์์ํฌ Spring20 ์คํ๋ง ๊ธฐ๋ณธ๊ตฌ์กฐ / ์๋์๋ฆฌ Spring์ ์ฃผ์ ๊ธฐ๋ฅ / ํน์ง MVC DI AOP POJO Spring MVC MVC: ์น ์ดํ๋ฆฌ์ผ์ด์ ๊ฐ๋ฐ ๋์์ธ ํจํด MVC๋ Model / View / Controller ์ ์ฝ์ model, view, controller ๋ค์ด ์ ๊ธฐ์ ์ผ๋ก ๋์ ๊ฐ๋ฐ์๊ฐ ์ง์ ์ปดํฌ๋ํธ๋ฅผ ํธ์ถํ์ง ์์๋ ์๋์ผ๋ก ๋ถ๋ฌ์ฃผ๋ฉฐ, ๋ฐ๋ณต์ ์ธ ์์ ์ ์ค์ฌ์ค ๋ฐ๋ผ์ ๊ฐ๋ฐ์๋ ํต์ฌ ๋ก์ง์ ์ง์คํ ์ ์์ [Spring MVC์ ์ฒ๋ฆฌ ๊ณผ์ ] DispatcherServlet์ด ํด๋ผ์ด์ธํธ๋ก ๋ถํฐ ์์ฒญ์ ๋ฐ์ HandlerMapping์ ํตํด ์์ฒญ์ ํด๋นํ๋ Controller๋ฅผ ์ฐพ๊ณ ํด๋น Controller๋ก ์์ฒญ์ ๋ณด๋ Contoller์์ ์์ ์ ์ํํ ํ ModelAndView๋ฅผ ๋ฐํ ViewResolver์์ ์ฌ์ฉ์์๊ฒ ๋ณด์ฌ์ค.. 2021. 6. 22. Spring MVC ํ๋ก์ ํธ์ ๊ธฐ๋ณธ๊ตฌ์กฐ www.iotworks.co.kr/xe/index.php?mid=JSP&document_srl=53855 2021. 4. 27. ์คํ๋ง ํ๋ ์์ํฌ - ๋ก๊ทธ (Log4j) ๋ฐ ์ธํฐ์ ํฐ (Interceptor) ์ค์ ๋ฒ 1. Log4j ์ค์ Log4j๋ ์๋ฐ๊ธฐ๋ฐ์ ๋ก๊น ์ ํธ๋ฆฌํฐ๋ก, Apache์์ ๋ง๋ ์คํ์์ค ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ค. ๊ฐ์๊ธฐ ๋ก๊ทธ๋ผ๊ณ ํ๋ฉด ์ด๊ฒ ๋ฌด์์ธ๊ฐ, ๊ทธ๊ฑธ ๋์ฒด ์ด๋ฐ ์จ๋จน๋๊ฒ์ธ๊ฐ!!!! ๋ผ๊ณ ์๊ฐํ ์ ์์ง๋ง, ๋ก๊ทธ๋ ์ฐ๋ฆฌ๊ฐ ๊ต์ฅํ ๋ง์ด ์ฐ๊ณ ์๋ค. ์๋ฅผ ๋ค์ด์, ๊ฐ๋ฐ์ ํ๋ค๊ฐ ์ด๋ค ๋ณ์์ ๊ฐ์ ํ์ธํ๊ณ ์ถ์ผ๋ฉด ์์ฐ์ค๋ฝ๊ฒ System.out.println()์ผ๋ก ์ถ๋ ฅ์ ํ๋๋ฐ, ์ด๋ฐ๊ฒ๋ค์ด ๋ชจ๋ ๋ก๊ทธ์ ํ ์ข ๋ฅ๋ผ๊ณ ์๊ฐํ ์ ์๋ค. ๊ทธ๋ฌ๋ฉด ๊ทธ๋ฅ System.out.println()์ผ๋ก ์ถ๋ ฅํ๋ฉด ๋๋๋ฐ ์ ๊ท์ฐฎ๊ฒ ๋ค๋ฅธ๊ฑธ ์ฌ์ฉํ๋๋ ์๋ฌธ์ด ๋ค ์ ์๋ค. ์ฌ์ค ์ฐ๋ฆฌ๊ฐ ํผ์์ ๊ทธ๋ฅ ์ฐ์ต์ผ์ ํ๋ก์ ํธ๋ฅผ ๋ง๋ค๊ฑฐ๋ ํ๋ฉด System.out.println()์ ํฐ ๋ฌธ์ ๊ฐ ์์ง๋ง, ์ค์ ํ๋ก์ ํธ๋ ํผ์์ ํ๋๊ฒ๋ ์๋๊ณ , ๋ .. 2021. 4. 27. ์คํ๋ง ํ๋ ์์ํฌ - ๊ฐ ๋๊ธฐ๊ธฐ ๊ธฐ๋ณธ index.jsp Hello Spring hello๋ก ์ด๋ home์ผ๋ก์ด๋ home.jsp home.jsp ์ด๋ฆ: ์ด๋ฆ:${_name } ์ด๋ฆ์ ๋ ฅ: ๋์ด์ ๋ ฅ: world๋ก ์ด๋ dispatcherServlet.xml HelloController.java package bit.com.a; import java.util.Date; import org.slf4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.ann.. 2021. 4. 19. ์ด์ 1 2 3 4 5 ๋ค์