티스토리 뷰
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>SpringEL 표현식</h1> <ul>Object
<li>${user.username} = <span th:text="${user.username}"></span></li>
<li>${user['username']} = <span th:text="${user['username']}"></span></li>
<li>${user.getUsername()} = <span th:text="${user.getUsername()}"></span></li>
</ul>
<ul>List
<li>${users[0].username} = <span th:text="${users[0].username}"></span></li>
<li>${users[0]['username']} = <span th:text="${users[0]['username']}"></span></li>
<li>${users[0].getUsername()} = <span th:text="${users[0].getUsername()}"></span></li>
</ul>
<ul>Map
<li>${userMap['userA'].username} = <span th:text="${userMap['userA'].username}"></span></li>
<li>${userMap['userA']['username']} = <span th:text="${userMap['userA']['username']}"></span></li>
<li>${userMap['userA'].getUsername()} = <span th:text="${userMap['userA'].getUsername()}"></span></li>
</ul>
<h1>지역 변수 - (th:with)</h1>
<div th:with="first=${users[0]}">
<p>처음 사람의 이름은 <span th:text="${first.username}"></span></p>
</div>
</body>
</html>
'dev > spring boot + intelliJ' 카테고리의 다른 글
thymleaf 리터럴 (0) | 2023.05.03 |
---|---|
thymeleaf 편의객체 접근 (0) | 2023.04.07 |
thymeleaf escape unEscape (0) | 2023.04.02 |
롬복사용 dto와 테스트 코드작성 (0) | 2021.07.26 |
lombok 설치하기 (0) | 2021.07.25 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 항해플러스
- filter
- 컨트
- 예외처리
- 백엔드 개발자 역량
- 로그인
- ArgumentResolver
- 향해플러스
- rejectValue
- 리터럴
- React
- 스프링부트
- JPA
- 향해99
- BindingResult
- 향해플러스백엔드
- 백엔드 개발자 공부
- react실행
- thymleaf
- hypertexttransferprotocol
- Java
- Intercepter
- 항해99
- HTTP
- exception
- jpa api
- reject
- 스프링공부
- 인터셉터
- SpringBoot
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
글 보관함