Spring Boot
-
[Spring] Spring에서 Scheduler 처리하기Spring 2022. 10. 26. 09:08
일정한 시간간격 또는 일정한 시각에 특정 로직을 돌리기 위해서 사용하는 것을 'Scheduler' 라고 한다. Spring에선 'Spring Scheduler' 라이브러리를 제공한다. 💡 Spring Scheduler Spring Scheduler는 Spring Boot starter에 기본적인 의존성이 제공되기 때문에 별도의 추가적인 의존성이 필요하지 않다. 사용하기 위해서 Application Class에 @EnableScheduling 어노테이션 선언 Application.class @EnableScheduling @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplica..
-
Spring Security + JWT 회원가입, 로그인 (1)Spring 2022. 10. 23. 15:55
해당 포스팅은 Spring Secuiry + JWT + JPA 를 이용해 회원가입, 로그인 관련 예제 입니다. 환경 : Spring boot(2.5.5) + Mysql Spring Security 영역 인증(Authentication)과 권한(Authorization) 인증(Authentication) : 보호된 리소스에 접근하는 사용자에게 적절한 접근 권한이 있는지 확인하는 일련의 과정 접근 주체(Principal) : 보호된 리소스에 접근하는 대상(사용자) 권한(Authorization) : 인증절차가 끝난 접근 주체가 보호된 리소스에 접근 가능한지를 결정 인가(Authorize) : 권한을 부여하는 작업 즉, 인증은 아이디와 비밀번호를 입력 받아 로그인 하는 과정 자체를 의미하는 것이고 권한이 필요..