spring (not boot) controller End-point setting

Kyle_Kim·2022년 3월 23일
0

웹개발

목록 보기
1/2

만약 @RequestMapping("/")같이 end-point에 기본 slash로 되어 있다면 기본적으로 "list-employees"가 아닌 index.jsp를 리턴 할 것이다. 하지만 index.jsp를 삭제해 준 후에 다시 서버를 시작하면 list-employees를
localhost:8080/projectName/에 뛰울 것이다.

@Controller
public class EmployeeController {
    @RequestMapping("/")
    public String index() {
        return "list-employees";
    }
}
profile
Make Things Right

0개의 댓글