Java

Spring Boot 프로젝트 시작 (JSP)

김모작자 2016. 1. 14. 01:10

Spring Boot 프로젝트를 만든 후 JSP 를 쓰려면

1) jstl, tomcat-embed-jasper 추가

2) application.properties 에

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

3) jsp 위치

src/main/webapp/WEB-INF/jsp

여기에 JSP 파일 위치하도록, 나머지 css, js 파일 등은 static 에 위치시키면 될듯..


4) non-jsp, html, css 등 파일 위치

index.html 를 예를 들면

src/main/resources/META-INF/resources/index.html
src/main/resources/resources/index.html
src/main/resources/static/index.html
src/main/resources/public/index.html


참고 URL :

https://spring.io/blog/2013/12/19/serving-static-web-content-with-spring-boot

https://www.leveluplunch.com/java/tutorials/003-getting-started-with-spring-boot/