java - Passing both String and JSON object in POSTMAN (REST client) -
i have created springboot application accepts 'string' , 'jsonobject' input.
i have tried passing passing them using params entering key & value like,
name xyz status { "a": ["12", "11", "21"], "b": ["aa", "bb", "cc"], "c": ["aaa"] }
but, "argument type mismatch\nhandlermethod details"
{ "timestamp": 1490697361238, "status": 500, "error": "internal server error", "exception": "java.lang.illegalstateexception", "message": "argument type mismatch\nhandlermethod details: \ncontroller [processing.querycontroller]\nmethod [public static java.lang.string preprocessing.querycontroller.abcmethod(java.lang.string,org.json.simple.jsonobject) throws java.io.ioexception,org.json.simple.parser.parseexception]\nresolved arguments: \n[0] [type=java.lang.string] [value=tempa]\n[1] [type=org.springframework.validation.support.bindingawaremodelmap] [value={}]\n", "path": "/preprocessor/load" }
you can @requestparam or @pathvariable send string , @requestbody send json.
if not getting told. share rest service code explain in details.
Comments
Post a Comment