Class HomeController

java.lang.Object
com.bayudwiyansatria.spring.controller.HomeController

@RestController @RequestMapping("/") public class HomeController extends Object
HomeController

This class handles HTTP requests for the home endpoint. It is annotated with @RestController to indicate that it is a Spring MVC controller. It is also annotated with @Slf4j to enable logging.

The getUserById method handles HTTP GET requests to the root endpoint.

Since:
0.0.1
Version:
0.0.1
Author:
Bayu Dwiyan Satria
  • Constructor Details

    • HomeController

      public HomeController(HomeService homeService)
      Constructs a new HomeController with the specified HomeService.
      Parameters:
      homeService - the HomeService to be used by this controller
      Since:
      0.0.1
  • Method Details

    • getUserById

      @GetMapping("") public org.springframework.http.ResponseEntity<Response> getUserById()
      Handles HTTP GET requests to the root endpoint. This method returns a ResponseEntity containing a Response object.
      Returns:
      a ResponseEntity with a Response object
      Since:
      0.0.1