SpringBoot如何开启restful接口呢?
下文笔者讲述SpringBoot中开启restful接口的方法分享,如下所示:
实现思路:
使用@RestController注解,即可很快设置一个restful接口
例:
@RestController
public class TestController {
@RequestMapping("/test")
String handleFoo(HttpServletResponse response) throws IOException {
return "test";
}
}
版权声明
本文仅代表作者观点,不代表本站立场。
本文系作者授权发表,未经许可,不得转载。


