0

I use Spring Boot. I have created a controller

@RepositoryRestController
@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/admin/users")
public class AdminUserRestController {

    @Autowired
    private AdminUserRestRepository  userRepository;

    ...
}

which uses a repository

@RepositoryRestResource(collectionResourceRel = "user", path = "user")
public interface AdminUserRestRepository extends PagingAndSortingRepository<User, Long> {

    ...
}

The application compiles correctly, but an error occurs when calling the address /admin/users

org.thymeleaf.exceptions.TemplateInputException: Error resolving template "admin/users", template might not exist or might not be accessible by any of the configured Template Resolvers

Why I am thrown away by a mistake associated with Template Resolvers?

sdfsd
  • 1,027
  • 2
  • 10
  • 15
  • This might help you https://stackoverflow.com/questions/15777425/springmvcthymeleaf-error-message-is-template-might-not-exist-or-might-not-be?rq=1 – Oyewole A. Samuel Sep 25 '17 at 03:17
  • @sdfsd do you have appropriate file in `/resources/templates/admin/users.html` for example? and you actually need to show as `AdminUserRestController` method that throws this exception... – varren Sep 25 '17 at 06:38

0 Answers0