java脚本执行方法
Posted 努力的小白菜
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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]); } }
以上是关于java脚本执行方法的主要内容,如果未能解决你的问题,请参考以下文章