속도 템플릿에서 세션 속성을 얻으려고 시도하는데, 스프링 부트 하지만 세션 속성을 가져올 수 없습니다.속도 템플릿에서 세션 속성을 가져옵니다.
$!request.getParameter('user')
$request.getParameter('user')
#set ($user = $request.get('user'))
$user
$session.geAttribute('user')
$request.getSession().getAttribute('user')
저는 논문을 사용하려고합니다. 그러나 나는 올바른 가치를 얻을 수 없었습니다.
Velocity에서 세션 속성을 얻으려면 어떻게해야합니까? 당신은 속도-도구에서 VelocityViewServlet에를 사용하는 경우
속도를 어떻게 구성 했습니까? – aksappy
@aksappy Application.properties 'spring.velocity.content 형 = text/html과; 문자셋 = UTF-8 spring.velocity.expose-세션 속성 = 진정한 spring.velocity.expose 요청 - 속성 = true' – Saveyourself