123456789101112131415161718 |
- package com.sf.controller;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.RestController;
- /**
- * @RestController 是Controller中的一种
- * 在不需要返回页面 只需要返回数据的时候 可以被使用
- */
- @RestController
- public class AuthorController {
- @GetMapping("/author")
- public String getAll(){
- return "liucixin ligang luyao";
- // return "刘慈欣 李刚 路遥";
- }
- }
|