@PostMapping

From NovaOrdis Knowledge Base
Revision as of 04:13, 12 October 2018 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

Internal

Overview

Designates a controller handler method to handle POST requests. The content of the posted HTML form is presented to the method as a domain model data object: when the form is submitted, the fields in the form are bound to properties of the domain model object instance. In the example below, the form is used to build a taco composition:

@PostMapping
public String processFormContent(Taco taco) {

        // ...

        return "redirect:/orders/current";
    }