๋กœ์ผ“๐Ÿพ
article thumbnail
[Spring] @Autowired ์‚ฌ์šฉํ•˜๊ธฐ
... 2021. 1. 11. 21:42

@Autowired๋ฅผ ์ด์šฉํ•˜๋ฉด xml์—์„œ ๋นˆ์„ ์ง์ ‘ ์„ค์ •ํ•  ํ•„์š”์—†์ด, ์Šคํ”„๋ง ์ปจํ…Œ์ด๋„ˆ๊ฐ€ ์•Œ์•„์„œ ์›ํ•˜๋Š” ํด๋ž˜์Šค๋ฅผ ์ฃผ์ž…์‹œ์ผœ์ค๋‹ˆ๋‹ค. ๊ทธ๋Ÿผ ๋ฐ”๋กœ ์˜ˆ์‹œ๋ฅผ ๋ณด์—ฌ๋“œ๋ฆฌ๊ฒ ์Šต๋‹ˆ๋‹ค. l ์˜ˆ์‹œ package com.spring.ex02; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import o..

profile on loading

Loading...