How to pass result of api to another api in Controller Java Spring MVC? -
i have 2 api in assetcontroller.java
1.
@requestmapping(value = "api/getstring", method = requestmethod.get, produces = "application/json") public @responsebody getresult<string> getstring() { string str= uuid.randomuuid().tostring(); return new getresult<>(str); }
2.
@requestmapping(value = "api/asset", method = requestmethod.post, consumes = "application/json") public responseentity<object> saveasset(@valid @requestbody assetdto asset, bindingresult result) throws validationexception, serviceexception, accessdeniedexception, notfoundexception {....//to something}
i want use str of api/getstring use in api/asset?how can that? much.
Comments
Post a Comment