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

@restcontroller

CRONOS answered on May 3, 2022 Popularity 10/10 Helpfulness 2/10

Contents


More Related Answers

  • response in django rest framework
  • Unit Testing the REST Controller
  • What is difference between Controller and RestController?
  • Add REST controller
  • Explain @RestController annotation in Spring Boot?
  • How do you create a controller in Spring? @Controller vs. @RestController?
  • spring rest controller
  • How do you create a controller in Spring? @Controller vs. @RestController?
  • Create a REST controller class
  • Why do we use ResponseEntity in a RESTful Service?
  • spring boot rest annotations

  • @restcontroller

    0
    Popularity 10/10 Helpfulness 2/10 Language java
    Source: Grepper
    Tags: java
    Link to this answer
    Share Copy Link
    Contributed on May 03 2022
    CRONOS
    0 Answers  Avg Quality 2/10

    Closely Related Answers



    0

    @RestController is a class-level annotation used for the resource class introduced in Spring 4. It is a combination of @Controller and @ResponseBody, and because of it, a class returns a domain object instead of a view.

    In the following code, you can see that the CalculationController class handles GET requests for /calculation by returning a new instance of the calculation class.

    We will implement two URIs for a Calculation resource—the square root (the Math.sqrt() function) as the /calculations/sqrt URI, and power (the Math.pow() function) as the /calculation/power URI.

    Popularity 7/10 Helpfulness 2/10 Language whatever
    Source: Grepper
    Tags: whatever
    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.