|
|
@@ -10,6 +10,7 @@ import com.etotem.cfc.mapper.*;
|
|
|
import com.fasterxml.jackson.core.type.TypeReference;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.context.annotation.Lazy;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
@@ -62,7 +63,11 @@ public class MembershipService implements MembershipServiceInterface {
|
|
|
@Resource
|
|
|
private VirtualGoodsConfigService virtualGoodsConfigService;
|
|
|
|
|
|
+ // @Lazy 打破 MembershipService ↔ VirtualPayService 循环依赖:
|
|
|
+ // MembershipService.createOrder → VirtualPayService.generateMembershipPayParams → MembershipService.getByOrderNo,
|
|
|
+ // 运行时才解析代理,启动期不再强制互相实例化
|
|
|
@Resource
|
|
|
+ @Lazy
|
|
|
private VirtualPayService virtualPayService;
|
|
|
|
|
|
@Resource
|