Bläddra i källkod

系统通知状态更改

igl 1 år sedan
förälder
incheckning
6790f83be4

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

@@ -28,6 +28,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -46,7 +47,7 @@ import java.util.stream.Collectors;
  */
 @Slf4j
 @Service
-@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+@RequiredArgsConstructor(onConstructor = @__({@Autowired, @Lazy}))
 @DubboService(interfaceClass = com.chelvc.cloud.vehicle.api.service.DynamicCommentService.class)
 public class DynamicCommentServiceImpl implements DynamicCommentService, com.chelvc.cloud.vehicle.api.service.DynamicCommentService {
   private final DynamicCommentMapper baseMapper;

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

@@ -33,6 +33,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.DubboService;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -51,7 +52,7 @@ import java.util.stream.Collectors;
  */
 @Service
 @Slf4j
-@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+@RequiredArgsConstructor(onConstructor = @__({@Autowired, @Lazy}))
 @DubboService(interfaceClass = com.chelvc.cloud.vehicle.api.service.DynamicContentService.class)
 public class DynamicContentServiceImpl implements DynamicContentService, com.chelvc.cloud.vehicle.api.service.DynamicContentService {
   private final DynamicContentMapper baseMapper;

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

@@ -24,6 +24,7 @@ import com.chelvc.framework.database.util.PagingUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -39,7 +40,7 @@ import java.util.Objects;
  */
 @Slf4j
 @Service
-@RequiredArgsConstructor(onConstructor = @__(@Autowired))
+@RequiredArgsConstructor(onConstructor = @__({@Autowired, @Lazy}))
 public class DynamicEvaluateRecordServiceImpl extends ServiceImpl<DynamicEvaluateRecordMapper, DynamicEvaluateRecord> implements DynamicEvaluateRecordService {
 
   private final DynamicEvaluateRecordMapper baseMapper;