Posted in General

Spring Boot App Default Web Route Issue

By default Spring Boot is an opinionated wrapper around the Spring Framework. Many things are managed for you such as HTTP port, web context root, web server implementation, etc.

If you are using a view templating framework such as Thymeleaf, you might overlook adding it to your pom.xml file such that Maven resolves all transitive dependencies for you. If you forget, you may see the following error:

Whitelabel Error Page

This application has no explicit mapping for /error, so you are seeing this as a fallback.

Thu Oct 20 10:44:19 EDT 2016

There was an unexpected error (type=Internal Server Error, status=500).

Path home does not start with a "/" character
To fix this, add the thymeleaf dependency to your pom file:
<dependency>
   <groupId>org.springframework.boot</groupId>
   <artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>

Author:

I love to learn. I am not so interested in buzzwords when it comes to gadgets. I would rather see how they work. Software is no different. Just trying to be better one byte at a time ^_^