Created
January 8, 2019 02:19
-
-
Save minikuma/0d3ffdbdc693d7638307069d6d200d41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Data | |
@AllArgsConstructor | |
@NoArgsConstructor | |
public class Student { | |
private String id; | |
private String name; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Controller | |
@RequestMapping("/") | |
public class StudentController { | |
@RequestMapping(value = "/student", method = RequestMethod.GET) | |
@ResponseBody | |
public String getStudent() { | |
Student s = new Student("minikuma", "jeaon"); | |
return s.toString(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment