java - learning Spring's @RequestBody and @RequestParam -


i'm editing web project uses spring , need adding of spring's annotations. 2 of ones i'm adding @requestbody , @requestparam. i've been poking around little , found this, still don't understand how use these annotations. provide example?

controller example:

@controller class foocontroller {     @requestmapping("...")     void bar(@requestbody string body, @requestparam("baz") baz) {         //method body     } } 

@requestbody: variable body contain body of http request

@requestparam: variable baz hold value of request parameter baz


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -