그룹과 아티팩트를 지정 해준뒤 Dependencies에 Spring web(톰캣 내장)과 Thymeleef 템플릿 선택 후 다운
스프링 부트가 제공하는 Welcome Page 기능
static/index.html 을 올려두면 Welcome page 기능을 제공한다.
https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/spring-boot-features.html#boot-features-spring-mvc-welcome-page
thymeleaf 템플릿 엔진
thymeleaf 공식 사이트: https://www.thymeleaf.org/
스프링 공식 튜토리얼: https://spring.io/guides/gs/serving-web-content/
스프링부트 메뉴얼: https://docs.spring.io/spring-boot/docs/2.3.1.RELEASE/reference/html/spring-boot-features.html#boot-features-spring-mvc-template-engines
devtools도 같이 import해주면 재시작 안하고 리빌드 하면 html내용이 바뀜
src->main : 배포 디렉토리
./java-> 자바 패키지
./resources/static : 정적 페이지
./resources/templates : 동적 페이지
src->test : 테스트 디렉토리
build.gradle -> 각종 설정 (임포트)
빌드도구를 gradle - > Intellij IDEA로 바꾸면 보다 빠르게 실행 될 수도 있음
'Spring' 카테고리의 다른 글
[Spring] BeanFactory와 ApplicationContext (1) | 2024.05.01 |
---|---|
[Spring] 스프링 컨테이너와 스프링 빈 (0) | 2024.05.01 |
[Spring,Java] IoC, DI, 컨테이너란? (0) | 2024.04.29 |
[Spring] 객체 지향 설계와 스프링 (1) | 2024.04.19 |
[Spring] 참고사항 - 출처 (0) | 2024.04.19 |