ard-work/src/main/java/com/ruoyi/device/uav/controller/ArdUavController.java
@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import javax.annotation.PostConstruct; @@ -31,8 +32,14 @@ @Autowired private UavService uavService; @Value("${uav.enabled}") private Boolean uavEnabled; @PostConstruct public void created() { if(!uavEnabled){//无人机加入开关 return; } this.uavService.login(); }