-
Lombok, Thymeleaf[공부] 프로그래밍/Spring・Spring Boot (JAVA) 2023. 4. 11. 14:39
Lombok
자바 라이브러리로 코드를 효율적으로 작성할 수 있도록 도와준다.
어노테이션을 추가함으로써 getter, setter, equals등과 같은 methodm를 따로 작성하지 않아도 된다.
@Data
-> @Getter, @Setter, @ToString, @EqualsAndHashCode, @RequiredArgsConstructor를 종합해 놓은 것@Data public class Test { private String name; }
Thymeleaf
html 태그에 속성을 추가해 페이지에 동적으로 값을 추가하거나 처리할 수 있다.
Thymeleaf 문법을 사용할 수 있도록 html 태그에 추가해준다.<!DOCTYPE html> <html lang="en" xmlns:th="http://www.thymeleaf.org">
# 반복문 <tr th:each="board : ${list}"> <td th:text="${board.id}">1</td> <td th:text="${board.title}">제목</td> </tr>
'[공부] 프로그래밍 > Spring・Spring Boot (JAVA)' 카테고리의 다른 글
Collections framework (0) 2023.04.27 Object 클래스, 제네릭 (0) 2023.04.24 @RestController, produces, subscribeOn (0) 2023.04.19 Flux, @Tailable (0) 2023.04.14 @PathVariable (0) 2023.04.12