DigestUtils工具类 public String EncodeByMd5(String password) { String md5Password = DigestUtils.md5DigestAsHex(password.getBytes()); return md5Password; }