Spring Boot Tomcat Standalone Cannot Resolve View
I have an app that I've been developing in Eclipse and I'd like to move to Idea. It's a Spring Boot based Spring MVC application that uses Thymeleaf for its UI.
If I deploy and run the app in Tomcat then it works, and if I run it in Eclipse (as a Spring Application), i.e. using Tomcat standalone it works.
I've used the intellij Gradle plugin to update the Intellij Idea projects and then loaded the app into Idea 15. I had a couple of issues with JARs not being found (in particular javax.servlet.* wasn't found at runtime) that I've fixed by changing the dependency option to 'Compile' although I'm not exporting the library.
The app now starts but when I browse to a page it can't load the view. I'm also using Spring Security and I've mapped '/login' to a controller that tries to return a view from 'WEB-INF/views/login/login.html' The error I'm getting is
"org.thymeleaf.exceptions.TemplateInputException: Error resolving template "login/login", template might not exist or might not be accessible by any of the configured Template Resolvers "
I have a SpringResourceTemplateResolverbean defined and this appears to be getting created
As I said above this works fine from Eclipse (and also standalone). Do I need to do anything else in IDEA to get it to work?
I'm running Idea 15 EAP (build 143.381.42) on Windows, I have the Spring facet added.
Kevin
请先登录再写评论。
Maybe you can share a sample project that would work from the command line Gradle, but not from IDEA?