title: In Spring, can I make a single field in @RequestBody optional?
body: <p>I have a route like:</p>
  <pre><code>@PostMapping(&quot;/&quot;)
  public void sendNotification(@RequestBody PostBody postBody){...}
  </code></pre>
  <p>And the fields in <code>PostBody</code> class are:</p>
  <pre><code>public class PostBody {
      private String type;
      private String payload;
      private String recipients;
      private String callerId;
  </code></pre>
  <p>I am wondering, can I make one or more of these fields optional, but not all of them?</p>
  <p>I guess if I use <code>(require = false)</code>, all fields will be optional, is that right?</p>
  <p>Then is there anyway to do that?</p>
  <p>Thanks!</p>