File tree Expand file tree Collapse file tree 6 files changed +76
-4
lines changed
java/org/tuna/zoopzoop/backend/global/aspect/time Expand file tree Collapse file tree 6 files changed +76
-4
lines changed Original file line number Diff line number Diff line change 8282 -p $NEW_PORT:8080 \
8383 --name $NEW_CONTAINER \
8484 --network common \
85- -e SPRING_PROFILES_ACTIVE=server \
85+ -e SPRING_PROFILES_ACTIVE=prod \
8686 -e SPRING_DATASOURCE_URL="${{secrets.PROD_DB_URL}}" \
8787 -e SPRING_DATASOURCE_USERNAME="${{secrets.PROD_DB_USERNAME}}" \
8888 -e SPRING_DATASOURCE_PASSWORD="${{secrets.PROD_DB_PASSWORD}}" \
Original file line number Diff line number Diff line change 5959 -p $NEW_PORT:8080 \
6060 --name $NEW_CONTAINER \
6161 --network common \
62- -e SPRING_PROFILES_ACTIVE=server \
62+ -e SPRING_PROFILES_ACTIVE=staging \
6363 # DB
6464 -e SPRING_DATASOURCE_URL="${{secrets.TEST_DB_URL}}" \
6565 -e SPRING_DATASOURCE_USERNAME="${{secrets.TEST_DB_USERNAME}}" \
Original file line number Diff line number Diff line change 11FROM openjdk:21-jdk-slim
22COPY build/libs/backend-0.0.1-SNAPSHOT.jar /app.jar
33
4- ENV SPRING_PROFILES_ACTIVE=server
5-
64ENTRYPOINT ["java" ,"-jar" ,"/app.jar" ]
Original file line number Diff line number Diff line change 1+ package org .tuna .zoopzoop .backend .global .aspect .time ;
2+
3+ import org .aspectj .lang .ProceedingJoinPoint ;
4+ import org .aspectj .lang .annotation .Around ;
5+ import org .aspectj .lang .annotation .Aspect ;
6+ import org .springframework .stereotype .Component ;
7+
8+ @ Aspect
9+ @ Component
10+ public class ExecutionTimeAspect {
11+
12+ @ Around ("execution(* org.tuna.zoopzoop.backend..*Controller.*(..))" )
13+ public Object measureExecutionTime (ProceedingJoinPoint joinPoint ) throws Throwable {
14+ long start = System .currentTimeMillis ();
15+
16+ Object result = joinPoint .proceed ();
17+
18+ long executionTime = System .currentTimeMillis () - start ;
19+ String methodName = joinPoint .getSignature ().toShortString ();
20+ System .out .println (methodName + " executed in " + executionTime + "ms" );
21+
22+ return result ;
23+ }
24+ }
Original file line number Diff line number Diff line change 1+ spring :
2+ datasource :
3+ url : ${SPRING_DATASOURCE_URL}
4+ username : ${SPRING_DATASOURCE_USERNAME}
5+ password : ${SPRING_DATASOURCE_PASSWORD}
6+
7+ jpa :
8+ hibernate :
9+ ddl-auto : update
10+
11+ data : # RedisTemplate 등을 사용하기 위한 직접 연결용
12+ redis :
13+ host : ${REDIS_HOST}
14+ port : 6379
15+ timeout : 6000
16+ password : ${REDIS_PASSWORD}
17+
18+ cache : # Spring Cache를 사용하기 위한 Redis
19+ type : redis
20+ redis :
21+ time-to-live : 300000
22+ cache-null-values : false
23+
24+ security :
25+ oauth2 :
26+ client :
27+ registration :
28+ kakao :
29+ redirect-uri : ${KAKAO_REDIRECT_URI}
30+ google :
31+ redirect-uri : ${GOOGLE_REDIRECT_URI}
32+
33+ front :
34+ redirect_domain : ${FRONT_REDIRECT_DOMAIN}
35+
36+ sentry :
37+ # Add data like request headers and IP for users,
38+ # see https://docs.sentry.io/platforms/java/guides/spring-boot/data-management/data-collected/ for more info
39+ send-default-pii : true
40+ environment : prod
41+ traces-sample-rate : 0.2
42+
43+ cloud :
44+ aws :
45+ s3 :
46+ prefix : prod/
Original file line number Diff line number Diff line change @@ -40,3 +40,7 @@ sentry:
4040 environment : prod
4141 traces-sample-rate : 0.2
4242
43+ cloud :
44+ aws :
45+ s3 :
46+ prefix : test/
You can’t perform that action at this time.
0 commit comments