Is @RequestMapping annotation a replacement of DWR?

186 Views Asked by At

I'm new to the spring-boot framework and a little bit confused.
Previously we use DWR to convert JAVA method in server's war package to javascript function. In Spring boot is the annotation @RequestMapping do the same? Thx.

1

There are 1 best solutions below

0
Gregor Zurowski On

No, the @RequestMapping annotation is not related to Direct Web Remoting. The annotation is used in the controller layer of Spring web applications to map requests onto methods.

A typical example for a RequestMapping looks as follows:

@RequestMapping(method = RequestMethod.GET, path = "/users")
public ResponseEntity<List<Post>> getPosts() {
    [...]
}

This will map incoming GET requests to path /users to this method.