File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,7 +46,12 @@ public class OAuthController {
4646 })
4747 @ PostMapping ("/kakao" )
4848 public BaseResponse <Tokens > kakaoLogin (@ Valid @ RequestBody KakaoLoginRequest request ) {
49+ long startTime = System .currentTimeMillis ();
4950 Tokens tokens = oauthService .kakaoLogin (request );
51+ long endTime = System .currentTimeMillis ();
52+ long duration = endTime - startTime ;
53+ log .info ("OAuthWarmupRunner 완료 - 소요 시간: {} ms" , duration );
54+
5055 return BaseResponse .success (tokens );
5156 }
5257
Original file line number Diff line number Diff line change 1+ package ssu .eatssu .global .runner ;
2+
3+ import org .springframework .boot .ApplicationArguments ;
4+ import org .springframework .boot .ApplicationRunner ;
5+ import org .springframework .stereotype .Component ;
6+
7+ import lombok .RequiredArgsConstructor ;
8+ import ssu .eatssu .domain .auth .dto .AppleLoginRequest ;
9+ import ssu .eatssu .domain .auth .dto .KakaoLoginRequest ;
10+ import ssu .eatssu .domain .auth .service .OAuthService ;
11+
12+ @ Component
13+ @ RequiredArgsConstructor
14+ public class WarmUpRunner implements ApplicationRunner {
15+
16+ private final OAuthService oAuthService ;
17+
18+ @ Override
19+ public void run (ApplicationArguments args ) throws Exception {
20+ try {
21+ KakaoLoginRequest kakaoRequest = new KakaoLoginRequest ("" ,"" );
22+ oAuthService .kakaoLogin (kakaoRequest );
23+
24+ AppleLoginRequest appleLoginRequest = new AppleLoginRequest ("" );
25+ oAuthService .appleLogin (appleLoginRequest );
26+
27+ }catch (Exception e ){
28+
29+ }
30+
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments