728x90
타임리프에서는 /question/detail/과 같은 문자열과 ${question.id}와 같은 자바 객체의 값을 더할 때는 |로 좌우를 감싸 주어야 합니다.
<a th:href="@{|/question/detail/${question.id}|}" th:text="${question.subject}"></a>
728x90
'Category > SpringBoot' 카테고리의 다른 글
타임리프 날짜 포맷하기 #temporals.format(날짜 객체, 날짜 포맷) (0) | 2024.09.02 |
---|---|
부트스트랩(Bootstrap)이란? (1) | 2024.09.02 |
타임리프 객체 길이 구하기 #lists.size(객체) (0) | 2024.09.02 |
Service(서비스)가 필요한 이유 (0) | 2024.09.01 |
자주 쓰는 Timeleaf의 3가지 속성 (0) | 2024.09.01 |