tanbin 6 месяцев назад
Родитель
Сommit
da685854be

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