@RequestMapping(value = {"/hello"}, method = RequestMethod.GET)
@ResponseBody
public ResponseEntity<String> getContent(@RequestParam(value = "url", required = true) String url) {
System.out.println("My passed url is: " + url);
}
当我这样做时
curl "localhost:8080/hello?url=http://www.test.com/boom/4?utm_source=Google+Places&utm_medium=LLM&utm_campaign=DAC+LLM"
我试图传递的URL作为GET参数在&
符号被截断,因为它认为它是另一个GET参数的开头。
My passed url is http://www.test.com/boom/4?utm_source=Google+Places
任何解决方法,或者我应该从GET更改为POST?