2016-05-10 7 views

Antwort

2

können Sie verwenden hauptsächlich 2 opions:

Option 1:

@RequestMapping("/{pathVariable}/yourUrl") 
public void yourRequestMethod(@PathVariable("pathVariable")String pathVariable){...} 

Und Sie die Anfrage wie folgt aufbauen sollte:

/yourValue/yourUrl 

Option 2:

@RequestMapping("/yourUrl") 
public void yourRequestMethod(@RequestParam("test")String test){...} 

Und du shou ld die Anfrage wie folgt aufbauen:

/yourUrl?test=yourValue 
3

Diese Arbeit sollte @RequestMapping("${test.str.value}") und in Ihrem application.proprties/ymltest.str.value = /test