IT개발정보/spring and java

Spring Annotation

terry.j 2023. 2. 7. 22:51

Spring Annotation

 

정의

 

 

 

종류

 

 

 

@RequestMapping

  • vlaue : 요청받을 URL 설정
  • method : 어떤 요청으로 받을지 정의 (GET, POST, PUT, DELETE등)

@RestController
public class MainController {
 
    @RequestMapping(value = "/main", method = RequestMethod.GET)
    public String Main(...) {
        ...
    }