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

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

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

unit testing - How to mock PreferenceManager in Android? -