@RestController = @Controller + @ResponseBody
@RestController
@Controller
@ResponseBody
data자체를 바로 json이나 xml로 보내자고 할때 사용하는 Annotation
API를 위한 별도의 Dto를 만들어야 한다. Entity를 dto로 쓰게되면 나중에 에러가 발생할 수 있다.
어떤문제?