티스토리 뷰
스프링 bean에 등록된 편의 객체 접근
${@객체명.hello('값')} 으로 접근 가능
html
<h1>편의 객체</h1> <ul>
<li>Request Parameter = <span th:text="${param.paramData}"></span></li>
<li>Request Parameter = <span th:text="${param.paramData}"></span></li>
<li>session = <span th:text="${session.sessionData}"></span></li>
<li>session = <span th:text="${session.sessionData}"></span></li>
<li>spring bean = <span th:text="${@helloBean.hello('Spring!')}"></span></li>
<li>spring bean = <span th:text="${@helloBean.hello('Spring!')}"></span></li>
</ul>
java
@Component("helloBean")
static class HelloBean{
public String hello(String data){
return "Hello" + data;
}
}
'dev > spring boot + intelliJ' 카테고리의 다른 글
| thymleaf 연산 (0) | 2023.05.03 |
|---|---|
| thymleaf 리터럴 (0) | 2023.05.03 |
| thymeleaf Object 표시, th:with 지역변수 사용 (0) | 2023.04.06 |
| thymeleaf escape unEscape (0) | 2023.04.02 |
| 롬복사용 dto와 테스트 코드작성 (0) | 2021.07.26 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- SpringBoot
- 스프링공부
- filter
- 향해플러스백엔드
- exception
- jpa api
- 향해플러스
- rejectValue
- 항해99
- reject
- Intercepter
- 리터럴
- thymleaf
- 향해99
- 로그인
- JPA
- Java
- 예외처리
- 항해플러스
- HTTP
- 백엔드 개발자 공부
- hypertexttransferprotocol
- 인터셉터
- react실행
- React
- ArgumentResolver
- 스프링부트
- 백엔드 개발자 역량
- 컨트
- BindingResult
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
글 보관함
