How to configure spring boot mvc app for JSP?

前端 未结 5 1848
遥遥无期
遥遥无期 2020-12-15 12:45

I am new to Spring boot ( and servlet 3.0 ). I am trying to create spring mvc project with JSP as view. When I return a view from my controller it is not getting resolved a

5条回答
  •  -上瘾入骨i
    2020-12-15 13:32

    1. Create webapp/WEB-INF/views {Name the last folder as U Like } under src/main
    2. add jstl jar

    3. add following two lines in application.properties

      spring.mvc.view.prefix:/WEB-INF/views/ spring.mvc.view.suffix:.jsp

      Run As Spring Boot App ..U are good to go !

      For More U can consult my this project on github : https://github.com/SudipBiswasRana/Using-JSP-As-View-For-Spring-Project

提交回复
热议问题