Breaking News: Grepper is joining You.com. Read the official announcement!
Check it out

@requestmapping

Motionless Meerkat answered on February 19, 2021 Popularity 10/10 Helpfulness 4/10

Contents


More Related Answers

  • http requests in spring boot
  • requests with parameters spring boot
  • requestmapping post
  • @requestmapping({link/link1})
  • @requestmapping({link/link1})
  • @api operation spring boot
  • How Spring MVC process an HTTP Request
  • @RequestMapping annotations at only method level
  • @RequestMapping annotations using only HTTP request types
  • What does Spring use HandlerMappings for?
  • What are the major differences between RequestMapping and GetMapping?
  • EventSourceMappingConfiguration

  • @requestmapping

    3
    Popularity 10/10 Helpfulness 4/10 Language whatever
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on Feb 19 2021
    Motionless Meerkat
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    0
    Popularity 8/10 Helpfulness 2/10 Language java
    Source: Grepper
    Tags: java
    Link to this answer
    Share Copy Link
    Contributed on Mar 06 2023
    Sumit Rawal
    0 Answers  Avg Quality 2/10

    0
    Popularity 5/10 Helpfulness 1/10 Language whatever
    Source: Grepper
    Tags: whatever
    Link to this answer
    Share Copy Link
    Contributed on Jan 01 2023
    Deepika Sahu
    0 Answers  Avg Quality 2/10

    0

    The @RequestMapping annotation is used at class level to map the /calculation URI to the CalculationController class; that is, it ensures that the HTTP request to /calculation is mapped to the CalculationController class. Based on the path defined using the @RequestMapping annotation of the URI (postfix of /calculation, for example, /calculation/sqrt/144), it would be mapped to the respective methods. Here, the request mapping, /calculation/sqrt, is mapped to the sqrt() method, and /calculation/power is mapped to the pow() method.

    You might have also observed that we have not defined what request method (GET/POST/PUT, and so on) these methods would use. The @RequestMapping annotation maps all the HTTP request methods by default. You could use specific methods by using the method property of RequestMapping. For example, you could write a @RequestMethod annotation in the following way to use the POST method:

    Popularity 6/10 Helpfulness 1/10 Language java
    Source: Grepper
    Tags: java
    Link to this answer
    Share Copy Link
    Contributed on Feb 19 2023
    Pragya Keshap
    0 Answers  Avg Quality 2/10


    X

    Continue with Google

    By continuing, I agree that I have read and agree to Greppers's Terms of Service and Privacy Policy.
    X
    Grepper Account Login Required

    Oops, You will need to install Grepper and log-in to perform this action.