2017-05-12 1 views
0

같은 리디렉션 컨트롤러에 있습니다 :페이지 매개 변수를 속성 키로 사용하는 방법은 무엇입니까?

return "redirect:login?message=login.registered"; 

HTML 템플릿에서 나는 login.registered 키 속성 값을 보여주고 싶어요. JSP에서

는 그냥이었다

<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> 
... 
<spring:message code="${param.message}"/> 

어떻게 같은 사용 Thymeleaf을 할?

답변

1

나는 thymeleaf에서 #messages 객체로 이것을 할 수 있다고 생각합니다. 작동해야 함 :

<div th:text="${#messages.msg(param.message)}" /> 
관련 문제