I'm trying to run my Spring Boot project with Intellij IDEA.
This project is of type Spring MVC, meaning that it has JSP files in path main/webapp/WEB-INF/jsp
.
My application.properties
has these settings:
spring.view.prefix=/WEB-INF/jsp/
spring.view.suffix=.jsp
When I'm running the project in Intellij as a "Spring Boot Run Configuration" the server can't identify the path of the JSP files. This is the message i get:
If I run the project with "Maven Run Configuration" with the command spring-boot:run
everything is working fine.
I have no idea why this is happening. The code and settings of the project are the same with each Run Configuration.
You can try this project (not my project) to understand what I mean https://github.com/mariuszs/spring-boot-web-jsp-example.
My project is behiving the same. I should note that when the project is running with Spring Boot Run Configuration I do see in the console that the controllers are mapped correctly.
2017-06-28 08:29:13.906 INFO 10308 --- [ main] o.s.w.s.h.SimpleUrlHandlerMapping : Mapped URL path [/login] onto handler of type [class org.springframework.web.servlet.mvc.ParameterizableViewController]
2017-06-28 08:29:13.835 INFO 10308 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/login],methods=[GET]}" onto public java.lang.String com.intuit.mintbills.controllers.generic.LoginController.getLoginPage()
webapp
is in themain
package?webapp
folder as "Resources" in IntelliJ.