Created
March 31, 2022 01:03
-
-
Save jebeaudet/127e6fb0b59e06c0642d2f362eac8d73 to your computer and use it in GitHub Desktop.
Pojo
This file contains hidden or 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
import org.springframework.web.bind.annotation.GetMapping; | |
import org.springframework.web.bind.annotation.RestController; | |
@RestController | |
public class Controller | |
{ | |
@GetMapping("/") | |
public String foo(Pojo pojo) | |
{ | |
return pojo.toString(); | |
} | |
public static class Pojo | |
{ | |
private InnerPojo innerPojo; | |
public InnerPojo getInnerPojo() | |
{ | |
return innerPojo; | |
} | |
public void setInnerPojo(InnerPojo innerPojo) | |
{ | |
this.innerPojo = innerPojo; | |
} | |
} | |
public static class InnerPojo | |
{ | |
private String field; | |
public String getField() | |
{ | |
return field; | |
} | |
public void setField(String field) | |
{ | |
this.field = field; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment