2013-11-26 47 views
0
@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); 
} 

當我做如何傳遞符號&in @RequestParam?

curl "localhost:8080/hello?url=http://www.test.com/boom/4?utm_source=Google+Places&utm_medium=LLM&utm_campaign=DAC+LLM" 

我試圖通過一個GET參數會在&標誌截斷,因爲它認爲它的另一個GET參數開始的URL。

My passed url is http://www.test.com/boom/4?utm_source=Google+Places 

任何方式來解決這個問題,或者我應該從GET更改爲POST?

回答

相關問題