티스토리 뷰
스프링 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
- 향해플러스백엔드
- reject
- 인터셉터
- 향해플러스
- react실행
- Intercepter
- thymleaf
- 항해99
- exception
- 예외처리
- SpringBoot
- 항해플러스
- filter
- ArgumentResolver
- HTTP
- BindingResult
- jpa api
- React
- 로그인
- 스프링공부
- Java
- 스프링부트
- 컨트
- 백엔드 개발자 역량
- 리터럴
- hypertexttransferprotocol
- JPA
- 향해99
- rejectValue
- 백엔드 개발자 공부
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함