瀏覽代碼

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

Xiaogang Liao 4 周之前
父節點
當前提交
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;
 
     /**