Spring&mybatis(ibatis)

@RestController , @Controller 차이점입니다

SeoHW 2018. 3. 20. 16:44
SMALL
@Controller 
@Controller
public class restClassName{

  @RequestMapping(value={"/uri"})
  @ResponseBody
  public ObjectResponse functionRestName(){
      //...
      return instance
   }
}

@RestController 

@RestController
public class restClassName{

  @RequestMapping(value={"/uri"})
  public ObjectResponse functionRestName(){
      //...
      return instance
   }
}
  @ResponseBody 가 기본적으로 적용됩니다@RestController 에서는요~


LIST