Skip to content

Instantly share code, notes, and snippets.

@spati-java
Last active September 15, 2018 22:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spati-java/0bdafee75dd59953db024a05a4ad468e to your computer and use it in GitHub Desktop.
Save spati-java/0bdafee75dd59953db024a05a4ad468e to your computer and use it in GitHub Desktop.
@RestController("/api/v1/profiles")
public class ProfileController {
private ProfileService service;
@Autowired
public ProfileController(ProfileService service) {
this.service = service;
}
@PostMapping
public ResponseEntity createProfile(
@RequestBody ProfileDocument document) throws Exception {
return
new ResponseEntity(service.createProfileDocument(document), HttpStatus.CREATED);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment