Commit b918e882 authored by tangwei's avatar tangwei

解决循环依耐

parent b65a3b4c
...@@ -8,6 +8,7 @@ import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto; ...@@ -8,6 +8,7 @@ import com.yeejoin.equipmanage.common.dto.AnalysisReportLogDto;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -45,6 +46,7 @@ public class AnalysisReportLogController extends AbstractBaseController { ...@@ -45,6 +46,7 @@ public class AnalysisReportLogController extends AbstractBaseController {
// 工具栏中,显示第几个按钮,从左到右,可由逗号隔开显示多个 // 工具栏中,显示第几个按钮,从左到右,可由逗号隔开显示多个
private String showButton = "6"; private String showButton = "6";
@Lazy
@Autowired @Autowired
IAnalysisReportLogService iAnalysisReportLogService; IAnalysisReportLogService iAnalysisReportLogService;
......
...@@ -100,6 +100,7 @@ public class CarController extends AbstractBaseController { ...@@ -100,6 +100,7 @@ public class CarController extends AbstractBaseController {
@Autowired @Autowired
ICarLonAndLatDataService iCarLonAndLatDataService; ICarLonAndLatDataService iCarLonAndLatDataService;
@Lazy
@Autowired @Autowired
IEquipmentService iEquipmentService; IEquipmentService iEquipmentService;
......
...@@ -14,6 +14,7 @@ import com.yeejoin.equipmanage.service.IEquipmentService; ...@@ -14,6 +14,7 @@ import com.yeejoin.equipmanage.service.IEquipmentService;
import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.*; import org.apache.poi.ss.usermodel.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
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;
...@@ -30,6 +31,7 @@ public class EquipmentDefUpload implements IEquipmentDefUpload { ...@@ -30,6 +31,7 @@ public class EquipmentDefUpload implements IEquipmentDefUpload {
@Autowired @Autowired
private EquipmentMapper equipmentMapper; private EquipmentMapper equipmentMapper;
@Lazy
@Autowired @Autowired
private IEquipmentService equipmentService; private IEquipmentService equipmentService;
......
...@@ -19,6 +19,7 @@ import com.yeejoin.equipmanage.mapper.*; ...@@ -19,6 +19,7 @@ import com.yeejoin.equipmanage.mapper.*;
import com.yeejoin.equipmanage.service.*; import com.yeejoin.equipmanage.service.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
...@@ -59,13 +60,14 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe ...@@ -59,13 +60,14 @@ public class EquipmentDetailServiceImpl extends ServiceImpl<EquipmentDetailMappe
@Autowired @Autowired
private IEquipmentCategoryService iEquipmentCategoryService; private IEquipmentCategoryService iEquipmentCategoryService;
@Lazy
@Autowired @Autowired
private IEquipmentService iEquipmentService; private IEquipmentService iEquipmentService;
@Autowired @Autowired
private IUnitService iUnitService; private IUnitService iUnitService;
@Lazy
@Autowired @Autowired
private IUploadFileService iUploadFileService; private IUploadFileService iUploadFileService;
@Autowired @Autowired
......
...@@ -18,6 +18,7 @@ import org.apache.commons.lang3.RandomStringUtils; ...@@ -18,6 +18,7 @@ import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
...@@ -48,6 +49,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment ...@@ -48,6 +49,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
private IEquipmentIndexService iEquipmentIndexService; private IEquipmentIndexService iEquipmentIndexService;
@Autowired @Autowired
private IUnitService iUnitService; private IUnitService iUnitService;
@Lazy
@Autowired @Autowired
private UploadFileMapper uploadFileMapper; private UploadFileMapper uploadFileMapper;
@Autowired @Autowired
...@@ -56,6 +58,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment ...@@ -56,6 +58,7 @@ public class EquipmentServiceImpl extends ServiceImpl<EquipmentMapper, Equipment
private PatrolFeign patrolFeign; private PatrolFeign patrolFeign;
@Autowired @Autowired
private RemoteSecurityService remoteSecurityService; private RemoteSecurityService remoteSecurityService;
@Lazy
@Autowired @Autowired
private IEquipmentDetailService iEquipmentDetailService; private IEquipmentDetailService iEquipmentDetailService;
......
...@@ -16,6 +16,7 @@ import java.util.stream.Collectors; ...@@ -16,6 +16,7 @@ import java.util.stream.Collectors;
import org.apache.commons.beanutils.BeanUtils; import org.apache.commons.beanutils.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -76,8 +77,10 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe ...@@ -76,8 +77,10 @@ public class RiskSourceSceneServiceImpl extends ServiceImpl<RiskSourceSceneMappe
private RemoteSecurityService securityService; private RemoteSecurityService securityService;
@Autowired @Autowired
private IEquipmentCategoryService iEquipmentCategoryService; private IEquipmentCategoryService iEquipmentCategoryService;
@Lazy
@Autowired @Autowired
private IEquipmentService iEquipmentService; private IEquipmentService iEquipmentService;
@Lazy
@Autowired @Autowired
private IEquipmentDetailService iEquipmentDetailService; private IEquipmentDetailService iEquipmentDetailService;
@Autowired @Autowired
......
...@@ -17,6 +17,7 @@ import com.yeejoin.equipmanage.service.IEquipmentService; ...@@ -17,6 +17,7 @@ import com.yeejoin.equipmanage.service.IEquipmentService;
import com.yeejoin.equipmanage.service.IStockDetailService; import com.yeejoin.equipmanage.service.IStockDetailService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.*; import java.util.*;
...@@ -29,10 +30,10 @@ import java.util.*; ...@@ -29,10 +30,10 @@ import java.util.*;
*/ */
@Service @Service
public class StockDetailServiceImpl extends ServiceImpl<StockDetailMapper, StockDetail> implements IStockDetailService { public class StockDetailServiceImpl extends ServiceImpl<StockDetailMapper, StockDetail> implements IStockDetailService {
@Lazy
@Autowired @Autowired
private IEquipmentDetailService iEquipmentDetailService; private IEquipmentDetailService iEquipmentDetailService;
@Lazy
@Autowired @Autowired
private IEquipmentService iEquipmentService; private IEquipmentService iEquipmentService;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment