fix: 使用@Autowired替代@Resource(Java 17兼容性)
This commit is contained in:
@@ -8,13 +8,13 @@ import cn.iocoder.yudao.module.asset.controller.admin.vehicle.vo.VehicleSimpleRe
|
|||||||
import cn.iocoder.yudao.module.asset.service.vehicle.VehicleService;
|
import cn.iocoder.yudao.module.asset.service.vehicle.VehicleService;
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
import io.swagger.v3.oas.annotations.Operation;
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|||||||
@Validated
|
@Validated
|
||||||
public class VehicleController {
|
public class VehicleController {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private VehicleService vehicleService;
|
private VehicleService vehicleService;
|
||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ import cn.iocoder.yudao.module.asset.dal.mysql.vehicle.VehicleBusinessMapper;
|
|||||||
import cn.iocoder.yudao.module.asset.dal.mysql.vehicle.VehicleLocationMapper;
|
import cn.iocoder.yudao.module.asset.dal.mysql.vehicle.VehicleLocationMapper;
|
||||||
import cn.iocoder.yudao.module.asset.dal.mysql.vehicle.VehicleStatusMapper;
|
import cn.iocoder.yudao.module.asset.dal.mysql.vehicle.VehicleStatusMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -34,13 +34,13 @@ import java.util.stream.Collectors;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class VehicleServiceImpl implements VehicleService {
|
public class VehicleServiceImpl implements VehicleService {
|
||||||
|
|
||||||
@Resource
|
@Autowired
|
||||||
private VehicleBaseMapper vehicleBaseMapper;
|
private VehicleBaseMapper vehicleBaseMapper;
|
||||||
@Resource
|
@Autowired
|
||||||
private VehicleLocationMapper vehicleLocationMapper;
|
private VehicleLocationMapper vehicleLocationMapper;
|
||||||
@Resource
|
@Autowired
|
||||||
private VehicleBusinessMapper vehicleBusinessMapper;
|
private VehicleBusinessMapper vehicleBusinessMapper;
|
||||||
@Resource
|
@Autowired
|
||||||
private VehicleStatusMapper vehicleStatusMapper;
|
private VehicleStatusMapper vehicleStatusMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user