igl пре 1 месец
родитељ
комит
998dba5f77

+ 2 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/AssessServiceImpl.java

@@ -37,6 +37,7 @@ import com.chelvc.framework.database.entity.ModifyEntity;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
@@ -53,7 +54,7 @@ import java.util.stream.Collectors;
  **/
 @Slf4j
 @Service
-@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+@RequiredArgsConstructor(onConstructor = @__({@Lazy, @Autowired}))
 public class AssessServiceImpl extends ServiceImpl<GoodsAssessMapper, GoodsAssess> implements AssessService {
     private final UserClient userService;
     private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd");

+ 2 - 1
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OmsOrderServiceImpl.java

@@ -44,6 +44,7 @@ import lombok.extern.slf4j.Slf4j;
 import org.apache.http.util.Asserts;
 import org.springframework.beans.BeanUtils;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -65,7 +66,7 @@ import java.util.stream.Collectors;
  */
 @Service
 @Slf4j
-@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+@RequiredArgsConstructor(onConstructor = @__({@Lazy, @Autowired}))
 public class OmsOrderServiceImpl extends ServiceImpl<OmsOrderMapper, OmsOrder> implements OmsOrderService{
     private final OmsOrderMapper omsOrderMapper;
     private final OmsCartItemService omsCartItemService;