I have the following controller:
@Controller
public class ConfigController {
@GetMapping("/")
public String index() {
return "config";
}
}
However, I receive the following error when going to the route /
:
There was an unexpected error (type=Internal Server Error, status=500).
Error resolving template [config], template might not exist or might not be accessible by any of the configured Template Resolvers
org.thymeleaf.exceptions.TemplateInputException: Error resolving template [config], template might not exist or might not be accessible by any of the configured Template Resolvers
I have a config.html
file inside of resources/templates
:
My pom.xml file: https://pastebin.com/yqYYuXWh
What am I doing wrong?
I have already tried adding a .html
to the return of the controller function, but it still doesn't work.
After removing the spring-web dependency (I already had spring-boot-starter-web
) I now get the following error when starting spring:
Cannot find template location: classpath:/templates/ (please add some templates or check your Thymeleaf configuration)
spring-web
from your pom.xml. Also it seems like you added a lot of different sql connectors, normally you'd only need one. – Frascati