问题:java.lang.IllegalArgumentException: Illegal character in query at index 53:

原因:url中有汉字或特殊字符(非字母和数字的字符例如:{ ,},"等),没有转码

解决方案:

将字符串进行转码

template= URLEncoder.encode(template, "UTF-8")

相关文章:

  • 2021-11-29
  • 2021-07-17
  • 2021-12-15
  • 2021-04-11
  • 2022-12-23
  • 2022-02-15
  • 2022-12-23
  • 2021-10-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-09-07
  • 2022-12-23
  • 2021-11-03
  • 2021-06-11
  • 2022-12-23
相关资源
相似解决方案