@RequestMapping(value = "/{version}",method = RequestMethod.GET) public String demo(@PathVariable String version){ return version; }
若是version是1.0.0,則返回1.0,這儼然不是咱們所指望的。spring
@RequestMapping(value = "/{version:.+}",method = RequestMethod.GET) public String demo(@PathVariable String version){ return version; }
想獲取最新內容,請關注微信公衆號微信