@PutMapping

From NovaOrdis Knowledge Base
Revision as of 02:08, 13 March 2019 by Ovidiu (talk | contribs) (→‎REST)
Jump to navigation Jump to search

Internal

Overview

The annotation may also contain a sub-path relative to the class-level base path, usually configured with @RequestMapping.

REST

@RestController
@RequestMapping(path = "/a", produces = "application/json")
public class AController {

  @PutMapping(consumes = "application/json")
  public A put(@RequestBody A a) {

    // wholesale replacement, make sure the A instance is valid
    ...
  }
}

HTTP PUT Semantics for REST Applications

HTTP PUT Semantics for REST Applications