Skip to content

스프링 시큐리티 세션 변경 코드 (유저정보 수정했을때) #3

@codingspecialist

Description

@codingspecialist

@PutMapping("/user")
public ResponseDto update(@RequestBody User user, @AuthenticationPrincipal PrincipalDetail principalDetail) { // key=value, x-www-form-urlencoded
userService.회원수정(user);

// 세션 정보 변경
principalDetail.setUser(user);
return new ResponseDto<Integer>(HttpStatus.OK.value(), 1);

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions