rinku das

Greenhorn
+ Follow
since Oct 12, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by rinku das

Hi,

Question : In my interceptor how do I get the post request details that is annotated with @Requestbody, so that I can perform some operation on the data of the request body that is passed.

Below is the code my code sample.

I have an interceptor:(below code)

public class TestInterceptor extends HandlerInterceptorAdapter {

@Override
public boolean preHandle(HttpServletRequest request,
HttpServletResponse response, Object handler) throws Exception {

logger.info("Before handling the request");
return super.preHandle(request, response, handler);
}


I have a contoller class as below

@Controller
public class TestController{

@RequestMapping(method = RequestMethod.POST, value = "/Test")
@ResponseBody
public ResponseEntity<Source> getTestSearch(
@RequestParam(required = false, value = "resultSetSize") Integer resultSetSize,
@RequestBody Source request) {

{
//code
}
}


Please provide a solution for this.

Thanks
rinku

11 years ago