我正在研究 spring。我无法在“abc.com/firstName.lastName”sping 中为这个 url 创建映射。如果我写了这段代码
@RequestMapping(value = "/{path}", method = RequestMethod.GET, produces = "application/json")
@Timed
public void saveProfileMapping(@PathVariable String path)
{
System.out.println("-------------getting Mapping--------------"+path);
}
然后只得到名字,即姓氏在spring.but如果这样写
@RequestMapping(value = "/{firstName}.{lastName}", method = RequestMethod.GET, produces = "application/json")
@Timed
public void saveProfileMapping(@PathVariable String firstName,String lastName)
{
System.out.println("-------------getting Mapping--------------"+firstName+lastName);
}
同样的结果在这里只得到名字。
请需要你的帮助..
提前致谢。