@RequestMapping(value = "/user")
@RestController
public class UserController {
@Autowired
private UserRepository userRepository;
@GetMapping("/")
public List<User> getUserList(){
return userRepository.findAll();
}
如上代码 ,预想请求路径应该是/user
,结果访问404,实际路径是/user/
网友评论