- SampleController생성
package com.jafa.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class SampleController {
@RequestMapping("/sample01/list") //요청 URL, method속성을 설정 하지 않으면 GET방식으로 요청
public String list1() {
return "sampleList";
// /WEB-INF/views/sampleList.jsp
}
}
- /sample01/list로 요청 했을 때 sampleList로 반환
