Skip to content

Commit

Permalink
modified template
Browse files Browse the repository at this point in the history
  • Loading branch information
laileon committed Jul 11, 2017
1 parent 905234a commit ecc7e14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/test/resources/generator/template/controller-restful.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class ${modelNameUpperCamel}Controller {
private ${modelNameUpperCamel}Service ${modelNameLowerCamel}Service;

@PostMapping
public Result add(${modelNameUpperCamel} ${modelNameLowerCamel}) {
public Result add(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}) {
${modelNameLowerCamel}Service.save(${modelNameLowerCamel});
return ResultGenerator.genSuccessResult();
}
Expand All @@ -33,7 +33,7 @@ public class ${modelNameUpperCamel}Controller {
}

@PutMapping
public Result update(${modelNameUpperCamel} ${modelNameLowerCamel}) {
public Result update(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}) {
${modelNameLowerCamel}Service.update(${modelNameLowerCamel});
return ResultGenerator.genSuccessResult();
}
Expand Down

0 comments on commit ecc7e14

Please sign in to comment.