0
設計我的RESTful API,因此我想用以下URISpring MVC:更正用於RESTful URI的控制器方法的註釋,包括';'
http://[HOST]/[PLANET]/[LAT];[LONG]
例如
http://myserver/earth/50.2;29.1
在Spring MVC中,這種方法的適當註釋是什麼?這是下一個好嗎?
@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
}
如果這個人是好的 - 什麼是@MaskFormat("###-##-####")
好?
謝謝,它工作出色。是的,我指的是'mvc-showcase'的註釋。 – 2010-09-22 18:47:10