티스토리 뷰

반응형
@Controller
public class SecurityController {

    @GetMapping("/messages/inbox")
    public ModelAndView currentUserName(@AuthenticationPrincipal CustomUser customUser) {
        String username = customUser.getUsername();

        // .. find messages for this user and return them ...
    }
}
반응형

'프로그래밍 > Spring' 카테고리의 다른 글

타임리프 주요 문법  (0) 2022.06.25
Spring 과 Spring Boot 의 차이  (0) 2022.06.24
Spring Boot Validation 주요 기능  (0) 2022.06.22
Get 과 Post 의 차이  (0) 2022.06.21
리포지터리(Repository)란?  (0) 2022.06.20
반응형
최근에 올라온 글
Total
Today
Yesterday
글 보관함