I am converting a Spring MVC app to Spring Boot. The Spring app has a Home controller:
@RestController
public class HomeController {...
...
@RequestMapping("/login")
public String login(Principal p) {
return "login";
}
}
which should just display the word 'login'. This however seems to be ignored since it also has a login.jsp under src/webapp/WEB-INF/views which does a lot more, and this is what is displayed when it is run.
When I cut and paste simple-web-app into a Boot app I just get the word 'login'.
How does Spring magically ignore the word 'login' for the more complex jsp output? And how do I mimic this in Boot?
PS I have tried adding:
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
spring.mvc.view.prefix=/views/
spring.mvc.view.suffix=.jsp