Jenkins插件开发:用参数化构建参数去替换对应配置文本框内容中${xxx}
直接上代码
@Test public void test3() { String original = "1 ${aa}2 ${cc}."; HashMap<String, String> envMap = new HashMap<>(); envMap.put("aa", "true"); envMap.put("cc", "ccx"); EnvVars env = new EnvVars(envMap); String expand = env.expand(original); System.out.println("expand = " + expand); }
本文来自博客园,作者:margo,转载请注明原文链接:https://www.cnblogs.com/ZMargo/articles/11834389.html