TemplateInputException: Error resolving template ****, template might not exist TemplateInputException: Error resolving template ****, template might not exist ajax ajax

TemplateInputException: Error resolving template ****, template might not exist


Need few more details on how you are setting your projects.

  1. where is your html located. Is it under /resources/templates ?

  2. you are missing <html xmlns:th="http://www.thymeleaf.org"> on your html.

  3. try commenting out your jQuery Ajax call and see if your initial html is loaded properly or not.

    1. Is your controller rest controller @RestController is a convenience annotation that does nothing more than adding the @Controller and @ResponseBody ?

Check these and it should fix your problem.


I changed my "/all" controller ever so slightly:

  @RequestMapping(value="/all", method=RequestMethod.GET)   @ResponseBody    public List<Team> getResource() {       List<Team> cueList = teamRepository.findAll();        return cueList;    }

By adding the ResponseBody annotation it solved all issues and the search works perfectly!