program_language 및 궁금한것/Thymeleaf

[Thymeleaf] java의 method 사용하기

jinsiri 2021. 4. 21. 22:35

타임리프에서 java의 method 사용이 필요할때 사용하는것

 

TestUtil.java 안에 go()라는 메서드를 사용해야 할때

 

<div th:text="${ @testUtil.go() }"></div>

 

@{ @소문자로 시작 java파일명.메소드() }

 

간단쓰, 편리한 타임리프

 

반응형