| | |
| | | @Autowired |
| | | private RedisCache redisCache; |
| | | |
| | | @Value("${uav.enabled}") |
| | | private Boolean uavEnabled; |
| | | |
| | | @PostConstruct |
| | | public void created() { |
| | | if(!uavEnabled){//无人机加入开关 |
| | | return; |
| | | } |
| | | |
| | | getUavConfig(); |
| | | this.login(); |
| | |
| | | } |
| | | |
| | | private void getUavConfig() { |
| | | this.host = ConfigUtils.getConfigValue("uav_host"); |
| | | /*this.host = ConfigUtils.getConfigValue("uav_host"); |
| | | this.username = ConfigUtils.getConfigValue("uav_username"); |
| | | this.password = ConfigUtils.getConfigValue("uav_password"); |
| | | this.salt = ConfigUtils.getConfigValue("uav_salt"); |
| | | /*this.host = "http://112.98.126.2:6100/"; |
| | | this.salt = ConfigUtils.getConfigValue("uav_salt");*/ |
| | | this.host = "http://112.98.126.2:6100/"; |
| | | this.username = "znstest"; |
| | | this.password = "znstest"; |
| | | this.salt = "0123456789012345";*/ |
| | | this.salt = "0123456789012345"; |
| | | if (StringUtils.isEmpty(this.host) || StringUtils.isEmpty(this.username) || StringUtils.isEmpty(this.password) || StringUtils.isEmpty(this.salt)) { |
| | | throw new RuntimeException("无人机参数配置缺失:"); |
| | | } |