@PostMapping
HTTP POST 요청을 처리
@RequestMapping(Method=RequestMethod.POST)와 같다.
@Controller
public class HomeController {
@PostMapping("/")
public String home() {
return "home";
}
}
https://standout.tistory.com/478
Annotation - @Controller
@Controller @Component 어노테이션의 특수한 종류 Spring MVC에서 Controller클래스 HTTP 요청을 처리하고, 적절한 비즈니스 로직을 호출 @Controller @RequestMapping("/user") public class UserController { @Autowired private UserS
standout.tistory.com
https://standout.tistory.com/480
Annotation - @GetMapping
@GetMapping HTTP GET 요청을 처리 @RequestMapping(Method=RequestMethod.GET)와 같다. @Controller public class HomeController { @GetMapping("/") public String home() { return "home"; } } / URL 경로에 대한 GET 요청을 처리 https://standout.tis
standout.tistory.com
https://standout.tistory.com/422
Servlet life cycle, init, doGet, doPost, destory
서블릿 life cycle init 초기화, 맨 처음 한 번만 호출 public class MyServlet extends HttpServlet { public void init() throws ServletException {// Servlet 초기화 작업 } } doGet 작업 수행, 클라이언트가 get 요청하는 작업을
standout.tistory.com
https://standout.tistory.com/183
정보 노출여부, get/post
인터넷서핑을 하다보면 길어지는 url을 자주 만나볼 수 있다. 이처럼 url에 정보를 표시해 넘기는 방식을 get, 숨겨 넘기는 방식을 post라 한다. get 얻다 (http://www.example.com/formsubmit?input1=value1&input2=val
standout.tistory.com
'JAVA > Spring' 카테고리의 다른 글
Annotation - @Repository (0) | 2023.04.19 |
---|---|
Annotation - @Service (0) | 2023.04.19 |
Annotation - @GetMapping (0) | 2023.04.19 |
Annotation - @RequestMapping (0) | 2023.04.19 |
Annotation - @Controller (0) | 2023.04.19 |