일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 인텔리제이 Web 애플리케이션
- JSP 실습
- MySQL workbench dump
- 중첩 if
- JAVA 변수
- 접근제어자
- 이클립스 설치
- @PreAuthorize("isAuthenticated()")
- D2Coding
- SQL dump
- Node.js 설치
- System클래스
- 회원정보 수정
- 스프링시큐리티 로그아웃
- if else if
- jdk 설정
- 별찍기
- Springsecurity
- SQL import
- if else
- 클래스 형변환
- 증감 연산자
- Scanner 시간구하기
- SpringSecurity 로그아웃
- SpringSecurity 로그인
- StringBuilder
- SpringBoot
- StringBuffer
- 중첩for
- 스프링부트 로그인
Archives
- Today
- Total
목록MySQL (1)
gi_dor

@GetMapping("/mypage") public String myPage(Model model , Principal principal) { if (principal == null || principal.getName() == null ) { return "redirect:/user/login "; } else { model.addAttribute("id",principal.getName()); return "redirect:/user/mypage"; } } Principal 객체를 사용해 현재 사용자의 정보를 가져옵니다. 사용자가 인증되지 않은 경우 principal이 null이거나 principal의 이름이 null인 경우 (둘다 같은말 아닌가 ?) /user/login으로 리디렉션 Princip..
Back_End/SpringBoot
2024. 4. 22. 12:45