소스 검색

fix 循环依赖

tanbin 6 달 전
부모
커밋
da685854be
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      device-api-service/src/main/java/com/xy/service/DeviceRegisterServiceImpl.java

+ 2 - 1
device-api-service/src/main/java/com/xy/service/DeviceRegisterServiceImpl.java

@@ -31,6 +31,7 @@ import lombok.Data;
 import lombok.RequiredArgsConstructor;
 import lombok.SneakyThrows;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.validation.annotation.Validated;
@@ -57,7 +58,7 @@ import static com.xy.utils.PlusBeans.*;
  */
 @Service
 @Api(tags = "设备-注册登记")
-@AllArgsConstructor
+@AllArgsConstructor(onConstructor_ = @Lazy)
 public class DeviceRegisterServiceImpl extends ServiceImpl<DeviceRegisterMapper, DeviceRegister> implements DeviceRegisterService {
 
     private DeviceCreateIdsMapper deviceCreateIdsMapper;