Reputation:
Im have @RestController and this method. how can I get any json and then select the handler depending on the method and pass it there for processing PS. I use GSON instead of JACKSON
Upvotes: 1
Views: 630
Reputation: 11307
You can use @RequestBody in your method and take a String parameter:
public AbstractJsonResponse(@PaqthVariable String method, @RequestBody String json) {
...
}
Mainly the part that says:
Annotation indicating a method parameter should be bound to the body of the web request
Upvotes: 1