标签 RestController和Controller源码 下的文章

关于在Spring4.x中,RestController和Controller到底有什么区别呢?官方的解释是这样的。官方文档:A convenience annotation that is itself annotated with @Controller and @ResponseBody.意思是: @RestController注解相当于@ResponseBody + @Controller合在一起的作用。1)如果只是使用@RestController注解Controller,则Controller中的方法无法返回jsp页面,配置的视图解析器InternalResourceView...

阅读全部