I have uriTemplate like this
/{repository}/{id}/action/{methodName}/**
org.springframework.data.rest.webmvc.util.UriUtils uses org.springframework.web.util.UriTemplate to get variables in findMappingVariable method
UriTemplate.Parser build pattern to this value
\Q/\E(.*)\Q/\E(.*)\Q/action/\E(.*)\Q/**\E
why not to this?
\\Q/\\E(.*)\\Q/\\E(.*)\\Q/action/\\E(.*)\\Q/\\E(.*)\\Q\\E
Because of this feature I have empty map there
Map<String, String> variables = new org.springframework.web.util.UriTemplate(mapping).match(lookupPath);
for this lookupPath
/educationDistrict/308/action/resetAddressesForYear/1
Aucun commentaire:
Enregistrer un commentaire