Skip to content

Instantly share code, notes, and snippets.

@jebeaudet
Created March 31, 2022 01:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jebeaudet/127e6fb0b59e06c0642d2f362eac8d73 to your computer and use it in GitHub Desktop.
Save jebeaudet/127e6fb0b59e06c0642d2f362eac8d73 to your computer and use it in GitHub Desktop.
Pojo
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