Designing my RESTful API, I would like use following URI
http://[HOST]/[PLANET]/[LAT];[LONG]
e.g.
http://myserver/earth/50.2;29.1
What is the appropiate annotation of a such a method in Spring MVC? Is this the following one ok?
@RequestMapping(value = "/{planet}/{lat};{long}", method = RequestMethod.GET)
public String showInfoAboutCoords(
@PathVariable final String planet,
@PathVariable final String lat,
@PathVariable final String long,
final HttpServletResponse response) {
// Implementation
}
If this one is ok - what is @MaskFormat("###-##-####")
good for?