package com.kwan.springbootkwan.controller; import com.kwan.springbootkwan.entity.Person; import com.kwan.springbootkwan.entity.User; import com.kwan.springbootkwan.service.IUserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.Date; import java.util.List; /** * Person相关 * * @author : qinyingjie * @version : 2.2.0 * @date : 2022/12/19 16:08 */ @RestController @RequestMapping("/person") public class PersonController { /** * { * "name": "zhang san", * "age": 24, * "birthday": "2022-12-19" * } */ @GetMapping("/person") public Person person() { Person person = new Person(); person.setName("zhang san"); person.setAge(24); person.setBirthday(new Date()); return person; } }