반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- controller
- 필터vs인터셉터
- MVC
- spring
- SpringMVC
- 필터의 정의
- Validation
- 세션vs쿠키
- 인터셉터의 정의
- spring MVC
- n+1
- 구글 보안 api 활용
- 401오류
- 세션의 정의
- 김영한
- @Controller
- 쿠키란
- 쿠키의 정의
- application-properties
- jpa
- Testcode
- optional
- filter vs interceptor
- 세션이란
- 유연한 컨트롤러1 - v5
- java.lang.AssertionError
- BindingResult
- springSecurityFilterChain 오류
- .orelseThrow
- abap value in field Data Class error
Archives
- Today
- Total
ABAP DUMP ERROR 24시
Thylmleaf 간단 용어 정리 본문
반응형
# 인프런 김영한의 스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술을 개인적으로 정리한 글입니다.
Q.HTML 엔티티가 뭐야?
웹브라우저는 < 를 HTML의 태그로 인식한다.
따라서 HTML 태그가 아닌 문자로 표현할수 있는 방법
Q. 이스케이프가 뭐야?
HTML에서 사용하는 특수 문자를 HTML 엔티티로 변환하는 방법
Q . 타임리프에서 Un 이스케이프 하는 방법
1. th:text => th:utext 로 변경한다.
2. [[...]] = > [(...)] 로 변경한다.
Q. Thymeleaf 객체 접근 방법
1. Http 요청 파라미터 접근 ${param.paramData}
2. Http 세션 접근 ${session.sessionData}
3. 스프링빈 접근 ${@helloBean.hello('Spring!')}
Q . URL 접근처리방법@{...}
1. 경로 변수
/hello/data1/data2
@{/hello/{param1}/{param2}(param1=${param1}, param2=${param2})}
2. 경로 변수 + 쿼리 파라미터
/hello/data1?param2=data2
@{/hello/{param1}(param1=${param1}, param2=${param2})}
Q. literal 처리
1.문자는 반드시 '' 로 감싸야한다.
<span th:text ="'hello'"</span>
2. literal 대체 기법 사용시
<span th:text="|hello ${data}|"></span> 처럼 사용이 가능하니 리터럴대체 ||를 사용하자.
Q. ${#ids.("xxx")}의 기능은?
<div>등록 지역</div>
<div th:each="region : ${regions}" class="form-check form-check-inline">
<input type="checkbox" th:field="${item.regions}" th:value="${region.key}"
class="form-check-input">
<label th:for="${#ids.prev('regions')}"
th:text="${region.value}" class="form-check-label">서울</label>
</div>
다음과 같이 each로 반복문이 돌때 동적으로 생성되는 th:field=${item.regions}의 id 값을
동적으로 넣어준다.
반응형
'[WEB]Back-end > Spring MVC' 카테고리의 다른 글
BindingResult Version3 properties를 활용한 동적 변경 (0) | 2022.02.20 |
---|---|
BindingResult를 활용한 Validation 처리 [전 vs 후(version1,2) ] (0) | 2022.02.19 |
HTTP 메시지 컨버터가 뭐야? (0) | 2022.02.16 |
스프링 서버에서 요청 데이터 만들기 (0) | 2022.02.16 |
스프링 서버에서 응답 데이터 만들기 (0) | 2022.02.16 |
Comments