Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Spring Basics Creating Controllers and Views Using Thymeleaf to Serve HTML

No view resolvers found

Hi, I create a home.html in resources/template, but when I return "home" in controller, it shows no view resolvers found. And when I run the server, the home page shows no explicit mapping for /error

2 Answers

I had the same issue and found the solution - when I updated the dependency in build.gradle, I left the version number on the spring-boot-starter-thymeleaf dependency. When I removed it, the view resolver was found and I no longer got the no explicit mapping for /error page.

Note that I also had to add the spring-boot-starter-web dependency due to the missing RequestMapping annotation as reported in another question on this video.

Thanks so much! Your solution works.

I am having a similar issue, but mine can't be resolved by removing the version number or I get an error and it can't find the repository. Currently, I have compile group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf', version: '2.0.0.RELEASE' compile group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: '2.0.2.RELEASE' This shows the /error page. If I remove 2.0.2.RELEASE then it can't find the repository and no page shows up at all