I\'m experimenting on re-writing my configuration-heavy, vanilla Spring MVC project using Spring Boot. I started a brand new Spring Boot project in IntelliJ using the Spring
The Solution
I found the answer via trial-and-error, which turned out rather annoying. I hope someone can correct me if this conclusion is wrong, but it appears that Spring Boot does not like the string WEB-INF. I renamed the WEB-INF directory to view and changed the application.properties to the following and the view loaded successfully.
spring.mvc.view.prefix=/view/
spring.mvc.view.suffix=.jsp
Additional Findings
The objective of this exercise was to create a working example of a minimal, Java-based configuration so I continued minimalising the setup. I then found that lots of advice dished out on multiple SO threads and forums did not help. @JBNizet provided a link in his comment to the Spring Boot docs which lists a very salient point that no one has mentioned: JSPs simply do not play well with Spring Boot as it has limitations depending on the embedded container chosen. With that in mind, I decided to try replacing JSPs with ThymeLeaf templates.
My new working config removes the need for these:
application.properties: spring.mvc.view.prefix + spring.mvc.view.suffixorg.springframework.boot / spring-boot-starter-tomcatorg.springframework.boot / tomcat-embed-jasperjavax.servlet / jstlSo just the default Spring Boot template and 2 ThymeLeaf dependencies with the views named as ViewName.html placed in src/main/resources/templates.
org.thymeleaf
thymeleaf
org.thymeleaf
thymeleaf-spring4