File tree Expand file tree Collapse file tree 4 files changed +47
-1
lines changed
src/main/java/com/develop/backend Expand file tree Collapse file tree 4 files changed +47
-1
lines changed Original file line number Diff line number Diff line change @@ -306,3 +306,5 @@ private Claims getPayloadFromJwtToken(String token) {
306306 return claims;
307307 }
308308```
309+
310+ 3.** AOP 적용하여 메타데이터 생성하기**
Original file line number Diff line number Diff line change @@ -30,10 +30,12 @@ dependencies {
3030 implementation ' org.springframework.boot:spring-boot-starter-web'
3131 implementation ' org.springframework.boot:spring-boot-starter-security'
3232 implementation ' org.springframework.boot:spring-boot-starter-logging' // Spring Boot 로깅 스타터 (SLF4J와 Logback 포함)
33-
33+ implementation ' org.springframework.boot:spring-boot-starter-aop' // aop 추가
34+
3435 developmentOnly ' org.springframework.boot:spring-boot-devtools'
3536
3637 // Lombok
38+
3739 compileOnly ' org.projectlombok:lombok'
3840 annotationProcessor ' org.projectlombok:lombok'
3941
Original file line number Diff line number Diff line change 1+ package com .develop .backend .aspect ;
2+
3+ import org .aspectj .lang .annotation .Aspect ;
4+
5+ /**
6+ * <p>
7+ * 사용자 정보 CMMaster 사전 세팅
8+ * </p>
9+ * <p>
10+ * Controller 진입 전 단계에 해당
11+ * </p>
12+ *
13+ * @author gyeongwooPark
14+ * @version 1.0
15+ * @since 2024.07
16+ */
17+ @ Aspect
18+ public class UserAspect {
19+
20+ }
Original file line number Diff line number Diff line change 1+ package com .develop .backend .fw .master ;
2+
3+ import lombok .Data ;
4+
5+ /**
6+ * <p>
7+ * 비즈니스 처리 시 공통으로 확장 받아야 하는 vo 객체
8+ * DB 메타데이터로 등록 될 데이터
9+ * </p>
10+ *
11+ * @author gyeongwooPark
12+ * @version 1.0
13+ * @since 2024.07
14+ */
15+ @ Data
16+ public class CMMaster {
17+
18+ // 사용자 ID
19+ private String userId ;
20+ // 사용자 IP
21+ private String userIp ;
22+ }
You can’t perform that action at this time.
0 commit comments