File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
backend/src/main/java/com/back Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 11package com .back ;
22
3+ import com .google .api .client .util .Value ;
4+ import jakarta .annotation .PostConstruct ;
35import org .springframework .boot .SpringApplication ;
46import org .springframework .boot .autoconfigure .SpringBootApplication ;
57import org .springframework .cache .annotation .EnableCaching ;
1113@ EnableCaching
1214@ EnableAsync
1315public class BackApplication {
16+
17+ @ Value ("${GOOGLE_APPLICATION_CREDENTIALS}" )
18+ private String googleCredentialsPath ;
19+
1420 public static void main (String [] args ) {
1521 SpringApplication .run (BackApplication .class , args );
1622 }
23+
24+ @ PostConstruct
25+ public void setGoogleCredentialsEnv () {
26+ // 구글 SDK가 인식할 수 있도록 시스템 속성에 넣어줌
27+ System .setProperty ("GOOGLE_APPLICATION_CREDENTIALS" , googleCredentialsPath );
28+ }
29+
1730}
You can’t perform that action at this time.
0 commit comments