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

24 lines
577 B

package com.nbaxp.Controllers;
import com.nbaxp.Entities.User;
import com.nbaxp.Services.UserService;
import org.springframework.data.domain.Page;
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 Page<User> index()
{
return this.userService.Query();
}
}