[ Spring Boot ] 스프링MVC & Thymeleaf part.3
·
Spring Boot
Thymeleaf 레이아웃1. include방식SampleController //include방식 처리 @GetMapping("/exLayout1") public void exLayout1() { log.info("exLayout---------"); } fragment1.html Part 1 Part 2 Part 3 exLayout1.htmlFragment TestLayout 1 - 1Layout 1 - 2Layout 1 - 3 exLayout1.html이 fragment1.html의 조각들을 가져와서 사용한다.th:replace: 기존의 내용 완전히 대체th:insert : 기존의 내용의 바깥쪽 태그 유지하고 내용 추가하기 2. 레이아웃 템플릿 만들기..
[ Spring Boot ] 스프링MVC & Thymeleaf part.2
·
Spring Boot
타임리프는 계속 된다..... 반복문에 state (index) 처리 [[${state.index}]] --- [[${dto}]]  제어문th:if ~ unless문 [[${state.index}]] --- [[${dto}]]  inline 속성SampleController일부 @GetMapping("/exInline") public String exInline(RedirectAttributes redirectAttributes) { log.info("exInline......"); SampleDTO dto = SampleDTO.builder() .sno(1..
[ Spring Boot ] 스프링MVC & Thymeleaf part.1
·
Spring Boot
Thymeleaf란?JSP를 대신하는 화면처리 기술 thymeleaf의 장점Model에 담긴 객체를 화면에서 js로 처리하기 편리JSP와 유사하게 ${ }를 별도 처리 없이 이용 가능연산, 포맷과 관련된 기능을 추가적인 개발 없이 지원개발도구를 이용할때 .html파일로 생성하는데 문제가 없고, 별도의 확장자를 이용하지 않는다라고는 하는데 아직 모르겠음프로젝트 설정기본 3개랑, thymeleaf dependencies에 추가 포트 8090 설정 Edit Configuration 에서  프로젝트 생성 SampleDTOpackage org.zerock.ex3.dto;import lombok.Builder;import lombok.Data;import java.time.LocalDate;@Data@Builder..
hanjuCoding
'Thymeleaf' 태그의 글 목록