模板可能不存在,或者任何已配置的模板解析器都可能无法访问

时间:2017-09-24 21:42:43

标签: java spring spring-mvc spring-boot spring-data

我使用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相关的错误而被抛弃?

0 个答案:

没有答案