title: How to use Spring Boot CRUD API to insert data in multiple tables using one POST endpoint
body: <p>How can a data be inserted using single POST endpoint in multiple tables. For example there are two tables</p>
  <pre><code>1. Employee
  2. Department 
  </code></pre>
  <p><a href="https://i.stack.imgur.com/93X2O.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/93X2O.png" alt="enter image description here" /></a></p>
  <p>These two tables have a primary key and foreign key relationship.</p>
  <p>How to achieve data insertion in two tables using a single POST endpoint ?</p>