| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.ExecutorService; |
| | | import java.util.concurrent.Executors; |
| | | |
| | | import static com.dji.sample.component.AuthInterceptor.TOKEN_CLAIM; |
| | | |
| | |
| | | // timerUtil.myTask2(); |
| | | // timerUtil.myTask3(); |
| | | timerUtil.mytask4(); |
| | | timerUtil.mytask5(); |
| | | timerUtil.mytask6(); |
| | | timerUtil.mytask7(); |
| | | |
| | | } catch (Exception e) { |
| | | throw new RuntimeException("db存储发送出现异常" + e); |
| | |
| | | return ResponseResult.success(); |
| | | } |
| | | |
| | | // @GetMapping ("/tests") |
| | | // public ResponseResult use() { |
| | | // try { |
| | | // TimerUtil.sendPostWithFileAndParameter("src/main/resources/tmp/20240613/205621_635148ea-0ddb-4b23-945c-8a67abd813c9.db", |
| | | // "635148ea-0ddb-4b23-945c-8a67abd813c9"); |
| | | // } catch (IOException e) { |
| | | // throw new RuntimeException(e); |
| | | // } |
| | | // return ResponseResult.success(); |
| | | // } |
| | | @GetMapping ("/tests") |
| | | public ResponseResult use() { |
| | | ExecutorService executor = Executors.newSingleThreadExecutor(); |
| | | executor.execute(() -> { |
| | | try { |
| | | timerUtil.sendPostWithFileAndParameter("DB/result_db.db", |
| | | "635148ea-0ddb-4b23-945c-8a67abd813c9"); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | }); |
| | | executor.shutdown(); |
| | | return ResponseResult.success(); |
| | | } |
| | | @PostMapping("/way") |
| | | public void getway(@RequestParam("file") MultipartFile file, |
| | | @RequestParam String workspaceId, |