Throw Exception from controller methods

This commit is contained in:
stevecookform3
2017-05-31 09:46:51 +01:00
parent 15a0bf5df5
commit 0f3f0686cc
2 changed files with 2 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ import java.util.concurrent.Callable;
public class {{classname}}Controller implements {{classname}} {
{{^jdk8}}{{#operation}}
public {{#async}}Callable<{{/async}}ResponseEntity<{{>returnTypes}}>{{#async}}>{{/async}} {{operationId}}({{#allParams}}{{>queryParams}}{{>pathParams}}{{>headerParams}}{{>bodyParams}}{{>formParams}}{{#hasMore}},
{{/hasMore}}{{/allParams}}) {
{{/hasMore}}{{/allParams}}) throws Exception {
// do some magic!{{^async}}
return new ResponseEntity<{{>returnTypes}}>(HttpStatus.OK);{{/async}}{{#async}}
return new Callable<ResponseEntity<{{>returnTypes}}>>() {