I'm looking for solution how to create with gradle executable JAR from Spring Boot application with JSPs. I found the solution with maven https://dzone.com/articles/spring-boot-with-jsps-in-executable-jars-1
Main idea is to put JSPs to src/main/resources/META-INF/resources/WEB-INF/jsp/
. And it works with maven, but not with gradle.
Thanks
1) add to standard spring-boot dependencies:
compile("javax.servlet:jstl")
compile("org.apache.tomcat.embed:tomcat-embed-jasper")
2) put JSPs to src/main/webapp/WEB-INF/jsp
3) change application.properties
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
Here is the example repo: https://github.com/markstein/Labor/tree/master/spring/labor-spring-boot
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.