Annotation-based Controller
@Controller >> @Controller >> public class TestClass { ... } 해당 클래스가 컨트롤러 클래스 임을 알려준다. 빈 설정 파일의 과 같은 태그를 작성하면 컨트롤러 클래스가 스프링에 자동 검색되게 해준다. @Resource >> @Resource(name = "beanName") name에 주어진 이름의 빈을 빈 설정에서 찾아 자동 주입 시켜준다. @RequestMapping >> @RequestMapping(value = "/test/hello.do", method = RequestMethod.GET) value에 주어진 URL 요청이 들어올 경우 해당 컨트롤러나 메서드가 실행된다. method에 주어진 http 방식의 요청이 들어올 경우 실행된다. @Model..
프로그래밍/Spring
2011. 8. 20. 21:11