一、返回数据,如json、字符串String
使用@RestController等同于@controller+@ResponseBody
二、返回html页面。使用@Controller
springboot项目,@controller和@RestController 返回数据和返回页面的方式对比
最新推荐文章于 2024-07-05 21:44:28 发布
一、返回数据,如json、字符串String
使用@RestController等同于@controller+@ResponseBody
二、返回html页面。使用@Controller