Spring 숙련주차/1주차

8. 로그인 구현 JWT

note994 2024. 8. 26. 17:59

spring-auth프로젝트 열기 -> UserController로 이동

UserController
LoginRequestDto

dto 패키지에 LoginRequestDto 클래스 생성하고 코드작성

UserController - login메서드
UserService 클래스의 login메서드 만들기

UserService에 JwtUtil 객체가 없었기 때문에 생성자를 통해 JwtUtil 객체를 주입받아왔다.