소스 검색

fix(backend): 打破 memberSubscriptionService↔butlerService 循环依赖 - @Lazy 注入

Xiaogang Liao 3 주 전
부모
커밋
ef65175783
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      cfc-backend/src/main/java/com/etotem/cfc/service/ButlerService.java

+ 2 - 0
cfc-backend/src/main/java/com/etotem/cfc/service/ButlerService.java

@@ -13,6 +13,7 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import org.springframework.context.annotation.Lazy;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -42,6 +43,7 @@ public class ButlerService {
     private ButlerAssignmentMapper butlerAssignmentMapper;
 
     @Resource
+    @Lazy
     private MemberSubscriptionService memberSubscriptionService;
 
     /**