Я пытаюсь отобразить url /locations/ averagelocationId‹/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?
Как правильно его использовать?