@RestController简单粗暴的理解就是@[email protected][email protected]
@RestController注解

下图所示为测试结果
@RestController注解
效果跟@[email protected]是一样的

另外

This code uses Spring 4’s new @RestController annotation, which marks the class as 
a controller where every method returns a domain object instead of a view. It’s shorthand for 
@Controller and @ResponseBody rolled together.

上面是官网的解释
由上面可见,@[email protected][email protected]

相关文章:

  • 2022-12-23
  • 2021-09-05
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2022-01-28
  • 2022-02-17
  • 2021-09-19
猜你喜欢
  • 2022-01-11
  • 2021-12-24
  • 2022-12-23
  • 2021-12-08
相关资源
相似解决方案