import org.apache.commons.codec.digest.DigestUtils; String str_sign = ""; //替换需要加密的字符串 String appkey = ""; //替换签名key String sign= str_sign + appkey; String str = DigestUtils.md5Hex(sign); vars.put("md5_sign",str);