title: Bind request mapping to submit input button in html (Springboot)
body: <p>My RequestController:</p>
  
  <pre><code>@Controller
  @RequestMapping("/request")
  public class RequestsController {
  
      private static final Logger log = LoggerFactory.getLogger(TmtApplication.class);
  
      @Autowired
      RequestRepository requestRepository;
  
      @Autowired
      UsersRepository usersRepository;
  
      @RequestMapping("/save")
      String saveRequest()
      {
          Request requestObj = new Request(usersRepository.findOne(1L), new Date());
          requestObj.setDescription("I got so bored");
          requestObj.setStatus(false);
          requestObj.setRequestDate(new Date());
          requestRepository.save(requestObj);
          return "index";
      }
  }
  </code></pre>
  
  <p>My button:</p>
  
  <pre><code>&lt;input type="submit" value="Submit Request" style="display: block;"&gt;
  </code></pre>
  
  <p>I'm trying to get my button to fire off this request. What should I add to my HTML to initiate the call for /save?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>Form:</p>
  
  <pre><code>&lt;form action="/request/save" method="post" commandName="requestData"&gt;
      &lt;input type="text" id="dateInput" value="" style="display: none;"/&gt;
      &lt;div style="width: 200px;"&gt;&lt;input type="submit" value="Submit Request" style="display: block;"&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>@RequestMapping(value = "/save", method = RequestMethod.POST)
      String saveRequest(@ModelAttribute("requestData") Request requestData, Map&lt;String, Object&gt; map,
                         HttpServletRequest request)
      {
          Request requestObj = new Request(usersRepository.findOne(1L), new Date());
          requestObj.setDescription(requestData.getDescription());
          requestObj.setStatus(false);
          requestObj.setRequestDate(requestData.getRequestDate());
          requestRepository.save(requestObj);
          return "save";
      }
  </code></pre>