KOSMO4-2 / KOSMO4-2/ToYou

각 페이지에서 세션 정보 가져오는 법

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags"%>

security 에서 로그인을 담당하면 security자체 세션 저장공간에 저장을 하게되고
저장하는 타입이 userDetail 형식이기 때문에 principal 이라는 객체에
userVO를 userDetail 타입으로 형변환해서 저장해놨습니다.

현재 header.jsp 에 선언되있는 상태이고 모든 페이지에 include 되어있어서 따로 선언은 안하셔도 될겁니다.
사용법은 jsp 파일에서 컨트롤러로 넘긴 값 사용하던 방식 그대로
${principal.user.{원하는 user값}} <= 방식으로 사용하시면 됩니다.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with header.jsp, where the Spring Security principal is declared for included pages. Verify how JSP pages access the stored user information through principal.user, then clarify or update the usage guidance so the intended session-access pattern and completion criteria are explicit.

Written by the indexing model from the issue text.

Assessment

Tech stack
spring
Domain
authentication, documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.