From 464c37789f3f3b547f85a014b8b577f977613390 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Tue, 30 Apr 2024 15:54:56 +0900 Subject: [PATCH] main() -> @GetMapping --- src/main/resources/template/controller.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/template/controller.tmpl b/src/main/resources/template/controller.tmpl index 7a6a04c..b5f4f5d 100644 --- a/src/main/resources/template/controller.tmpl +++ b/src/main/resources/template/controller.tmpl @@ -4,6 +4,7 @@ import java.util.List; import javax.annotation.Resource; +import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; @@ -34,7 +35,7 @@ public class {controllerClass} extends ApplicationController { * 조건없는 {@link #get{entityClass}List({queryClass}) {entityComment} 조회 결과}를 포함시킨다. * @return /{entityName}/{entityName}-main */ - @RequestMapping(name = "{entityComment} 메인", value = "/main.do") + @GetMapping(name = "{entityComment} 메인", value = "/main.do") public ModelAndView main() { ModelAndView mav = get{entityClass}List(new {queryClass}().setPageNum(1)); mav.setViewName("/{entityName}/{entityName}-main");