java腳本執行方法


@Test
    public void modifyTest() throws IOException {

        File file = new File("/Users/zl/pending file/修復數據.txt");
        List<String> list = FileUtils.readLines(file, StandardCharsets.UTF_8);

        Map<String, Object> body;
        Map<String, String> header;
        for (String s : list) {
            String[] split = s.split("\\t");

            CoreHttpClient coreHttpClient = CoreHttpClient.builder().build();

            String url = "http://localhost:8080/vsd/bsadc/bd/rdasy/v1/apdsad-repaasy";

            header = new HashMap<>(4);
            header.put("unionId", split[1]);

            body = new HashMap<>(4);
            body.put("biz_order_no", split[0]);

            String post = coreHttpClient.post(url, body, header);

            System.out.println(post);
            System.out.println("bizOrderNo:" + split[0] + ",unionId:" + split[1]);
        }

    }

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM