1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
package com.example.helloworld.controller;
import com.example.helloworld.bean.Person;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class HelloController {
@Autowired
Person person;
@RequestMapping("/person")
public Person person(){
return person;
}
}
//{"userName":"zhangsan","boss":false,"birth":"2019-12-12T12:12:33.000+00:00","age":18,"pet":{"name":"tomcat","weight":23.4},"interests":["篮球","游泳"],"animal":["jerry","mario"],"score":{"english":{"first":30,"second":40,"third":50},"math":{"0":131,"1":140,"2":148},"chinese":{"first":128,"second":136}},"salarys":[3999.0,4999.98,5999.99],"allPets":{"sick":[{"name":"tom","weight":null},{"name":"jerry","weight":47.0}],"health":[{"name":"mario","weight":47.0}]}}
|