我使用Spring Boot。我创建了一个控制器
@RepositoryRestController
@PreAuthorize("hasRole('ROLE_ADMIN')")
@RequestMapping(value = "/admin/users")
public class AdminUserRestController {
@Autowired
private AdminUserRestRepository userRepository;
...
}
使用存储库
@RepositoryRestResource(collectionResourceRel = "user", path = "user")
public interface AdminUserRestRepository extends PagingAndSortingRepository<User, Long> {
...
}
应用程序正确编译,但在调用地址/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
为什么我因与Template Resolvers
相关的错误而被抛弃?