강의

멘토링

로드맵

Inflearn Community Q&A

yeongyunim2523373's profile image
yeongyunim2523373

asked

Spring MVC Part 2 - Backend Web Development Application Techniques

GetMapping() path 질문

Written on

·

248

1

@RequestMapping("/basic")
public class BasicController{
...
}

이러한 컨트롤러에서

각 메소드에 쓰이는 @GetMapping 에서

@GetMapping("/~~") 과 @GetMapping("~~") 의 차이점은 따로 없나요?

클래스 위에 @RequestMapping 으로 쓸 때도 "/basic", "/basic/" 의 차이점도 궁금합니다.

 

둘 다 시도해봤을 때 localhost:8080/basic/~~ 으로 동일하게 요청이 받아들여지는 걸로 보여서 질문드립니다!

springMVC

Answer 1

0

안녕하세요. 임연균님, 공식 서포터즈 OMG입니다.

아래 글 답변 참고해주세요:)

https://www.inflearn.com/questions/455919

감사합니다.

yeongyunim2523373's profile image
yeongyunim2523373

asked

Ask a question