URL /locations/{locationId}/edit.html をマップしようとしています - このコードで動作するようです:
@Controller
@RequestMapping( "/locations" )
public class LocationController
{
@RequestMapping( value = "/{locationId}/edit.html", method = RequestMethod.GET )
public String showEditForm( Map<String, Object> map, @PathVariable int locationId )
{
map.put( "locationId", locationId );
return "locationform";
}
}
上記の URL を呼び出すと、例外が発生します。
java.lang.IllegalArgumentException: Name for argument type [int] not available, and parameter name information not found in class file either.
@PathVariable アノテーションを間違った方法で使用していますか?
正しい使い方は?