You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
iot/labs/SpringDataJPATest/src/main/java/com/nbaxp/Controllers/HomeController.java

22 lines
513 B

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();
}
}