Spring Boot 入门 - 2.1 构建一个较为复杂的 RESTful API

Spring Boot 注解说明 @Controller:修饰class,用来建立处理http请求的对象 git @RestController:Spring4以后加入的注解,原来在@Controller中返回json须要@ResponseBody来配合,若是直接用@RestController替代@Controller就不须要再配置@ResponseBody,默认返回json格式。 github
相关文章
相关标签/搜索