Skip to content

Commit

Permalink
Merge pull request #27 from narakai/dev
Browse files Browse the repository at this point in the history
update > controller-restful.ftl  update, add method
  • Loading branch information
lihengming authored Jul 11, 2017
2 parents 905234a + ecc7e14 commit 121b7ef
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 121b7ef

Please sign in to comment.