Spring Security 3.1 에서 아래와 같은 코드를 화면에 적용하여 로그인 여부를 구분할 수 있습니다.
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<sec:authorize access="isAnonymous()">
<a href="/login" target="_self">Login</a>
</sec:authorize>
<sec:authorize access="isAuthenticated()">
<a href="/logout" target="_self">Logout</a>
</sec:authorize>
'Tip > Spring' 카테고리의 다른 글
[Maven] thymeleaf-extras-springsecurity3-2.0.0 다운로드 실패 (0) | 2013.07.29 |
---|---|
Spring MVC + Thymeleaf (0) | 2013.07.24 |
Jackson library 이용하여 date format 변경하기 (0) | 2013.07.08 |
web.xml 에서 classpath 사용시 주의사항 (0) | 2013.04.16 |
jxls + excel download + Spring (3) | 2012.02.20 |