[Spring Boot] @RequestMapping과 URI
·
BackEnd/spring
@RequestMapping이 붙어 있는 메서드는 Client의 특정 요청이 왔을 때 Spring Framework에 의해 호출된다. 그렇다면 아래 코드처럼 여러 개의 메서드가 있을 때 어떤 메서드가 호출될까? -> Spring Controller의 메서드들은 URI에 따라 호출이 결정된다. package com.example.controllerexercise.controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HelloController { @RequestMa..