spring mvc - JSON RAW REQUEST in controller -
i have code below
@requestmapping(method = requestmethod.post) public @responsebody serviceresponse submitcustomerorder(@requestbody submitcustomerorderrequest submitcustomerorderrequest,httpservletrequest request) { string json=???? }
i need de-serialization should happen submitcustomerorderrequest object need raw json request in string logging request purpose.
can me on this.
use google's gson library
log.info(new gson().tojson(submitcustomerorderrequest))
Comments
Post a Comment