package com.nbaxp.Controllers; import com.nbaxp.Services.UserService; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class HomeController { private final UserService userService; public HomeController(UserService userService) { this.userService=userService; } @RequestMapping("/") public long index() { return this.userService.Query().getTotalElements(); } }