[
https://issues.apache.org/jira/browse/SCB-701?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
liubao resolved SCB-701.
------------------------
Resolution: Fixed
Fix Version/s: (was: java-chassis-1.0.0-m2)
java-chassis-1.0.0
Remaining problems I create a new issue to track : SCB-709 - Implement JAX-RS
body parameter required feature
> RequestBody(required = false) and when requestBody is null then exception
> observed
> ----------------------------------------------------------------------------------
>
> Key: SCB-701
> URL: https://issues.apache.org/jira/browse/SCB-701
> Project: Apache ServiceComb
> Issue Type: Improvement
> Components: Java-Chassis
> Affects Versions: java-chassis-1.0.0-m2
> Reporter: Mahesh Raju Somalaraju
> Assignee: sukesh
> Priority: Major
> Fix For: java-chassis-1.0.0
>
>
> RequestBody(required = false) and when requestBody is null then exception
> observed
>
> @ApiOperation(value = "saysomething", notes = "saysomething")
> @RequestMapping(path = "/saysomething", method = RequestMethod.POST)
> @Transactional(propagation = Propagation.REQUIRED, rollbackFor =
> Exception.class)
> public String saySomething(@RequestBody(required=false)
> @ApiParam(required=false) Person user) throws Exception {
> if (user == null) {
> return "please provide user details";
> }
> return user.getName();
> }
>
> When requestBody is null then Exception is oberved. when requestbody
> required is false then no Exception should come.
>
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)