Url传递参数时,后台取值会直接取等号后面的内容,包括引号在内。

比如:   http://localhost:8080/user?name='admin'

这是错误的做法,后台获取到的参数是包括引号在内的'admin',并不是admin

如果想在Url中传递参数,无须加上引号,直接传内容就可以了。

比如:   http://localhost:8080/user?name=admin

相关文章:

  • 2021-10-18
  • 2021-08-05
  • 2022-01-18
  • 2022-12-23
  • 2021-10-01
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
猜你喜欢
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-04
  • 2023-03-20
相关资源
相似解决方案