As part of development I would like to maintain the two different versions of response.I have used produces key word as part of request mapping to differentiate the implementation.
when version = 1.0 the method for first implementation should be called,when version 2.0 then method for second implementation should be called.
But in my case its always the method with lower version is getting called.
**
@RequestMapping(value = "/example", method = GET,produces= HAL_JSON_VALUE+";version=1")
public void method1(){
System.out.println("in method1");
}
@RequestMapping(value = "/example", method = GET,produces= HAL_JSON_VALUE+";version=2")
public void method2(){
System.out.println("in method2");
}
**