I am trying to map /my/route/id to an action but the parameter id keeps coming in as null. Does anyone know what I’m doing wrong?
Controller mapping code:
@Controller
@RequestMapping("/admin/alias")
public class AliasesController {
@RequestMapping(value = "{id}", method = RequestMethod.GET)
public @ResponseBody SampleAliasMaskModel index(Integer id) {
Code issuing the request
$('select[name=aliasMask]', ctx).change(function () {
var val = parseInt($(this).val(), 10);
if (val === -1)
return maskSelected(null);
if (!_.isNaN(val))
$.getJSON('alias/'+val, {}, function(mask){
maskSelected(mask);
});
})
The request itself:

If spring isn’t compiled with debug information you have to specify the name of the Pathvariable as annotation parameter.
Like this:
Maybe that’s the reason.