0

I have downloaded a small Spring Boot project from Spring Initializer. Imported to STS and have started the application. Have written a controller also. Below is the same

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class Controller {

    @GetMapping("/hello")
    public String helloWorld() {
        System.out.println("Hi this is rest api");
        return "hello World!";
    }
}

Now I would like to know which REST implementation I am using which is coming by default here, is it Jasper JAX-RS, RESTEasy etc as I have not added any dependency of them.

This has been a serious interview question and have been asked many times and everytime I scratched my head trying to know.

I think for Jasper and RESTEasy we need to add the dependencies. But would like to know which implementation that comes here by default?

Learner
  • 53
  • 4
  • This code uses none of them. JAX-RS is a specification which is entirely different from the Spring MVC implementation of rest endpoints. [This answer](https://stackoverflow.com/a/42955575/7661119) provides a good comparison between Spring MVC and JAX-RS. – Ervin Szilagyi Aug 14 '21 at 22:55

0 Answers0