How to capture integer value from JSON input in spring?

Viewed 1646

In my spring project, I am getting all input values in JSON format.

@ResponseBody UserDto userDto

The ResponseBody annotation is good to capture data. But how can I achieve something as follows?

@ResponseBody String userId;

While writing the above code userId is not getting. Is there any other annotation available to capture single value without using a wrapper? or can I create a custom functionality myself to achieve this?

Any suggestions will be useful.

1 Answers
Related