का उपयोग करते समय अनुरोधित मान (यूआरएल) प्राप्त करें जब मैं @RequestMapping (जैसे Multiple Spring @RequestMapping annotations) पर एकाधिक मान मैप करता हूं, तो क्या मुझे अनुरोधित मान (यूआरएल) मिल सकता है?@RequestMapping एनोटेशन
इस तरह:
@RequestMapping(value={"/center", "/left"}, method=RequestMethod.GET)
public String getCenter(Model model) throws Exception {
String requestedValue = getRequestedValue(); // I want this.
// I want to do something like this with requested value.
String result;
if (requestedValue.equals("center")
result = "center";
else if (requestedValue.equals("left")
result = "left";
return result;
}
उपयोग कर सकते हैं यह तेजी कि Sangdol अलग यूआरएल, नहीं http मूल्यों मतलब है। (तो उसका शब्द "मूल्य" थोड़ा उलझन में है) – Ralph