I have two Apex Rest Webservice Rest1 & Rest2.
Rest1 webservice Apex class has annotation
Rest2 webservice Apex class has annotation
@RestResource(urlMapping='/ApexRest/*') which is saved last.
But when I tried to call the Apex Rest webservice using url
url/service/apexrest/ApexRest it calls Rest1 not Rest 2 which is last saved. So I am getting confused, Is salesforce documentation is right?
An extract from Page No: 255 Force.com Apex Code Developer's Guide V34.0 summer'15 documentation:
The URL patterns URLpattern and URLpattern /* match the same URL. If one class has a urlMapping of URLpattern and another class has a urlMapping of URLpattern /*, a REST request for this URL pattern resolves to the class that was saved last.