Ich bekomme Methode POST nicht unterstützt Fehler beim Übergeben von Wert arg in @RequestMapping wie folgt.Methode POST nicht unterstützt Problem im Frühjahr mvc
@RequestMapping(value = "/cancelLoanApp.rm", method = RequestMethod.POST)
cancelLoanApplicationSubmit(@ModelAttribute("cancelApplication")
CancelApplicationEntry cancelApplication{
...
...
}
Aber wenn ich so tue,
@RequestMapping(value = "/{pathURL}", method = RequestMethod.POST)
public String cancelLoanApplicationSubmit(@ModelAttribute("cancelApplication")
CancelApplicationEntry cancelApplication, @PathVariable String pathURL){
pathURL = "cancelLoanApp.rm";
...
...}
mein Code funktioniert gut und das zugeordnete Verfahren trifft aber @ModelAttribute wird zweispaltige in String-Felder angehängt wird. Bitte erklären Sie mir den Unterschied, den beide machen.
was 'cancelLoanApp.rm' rm gibt an .rm zu Ihrer URL-Mapping zugeordnet ist? –
und wie Sie Ihre zweite Methode im obigen Code aufrufen? –
@KalaiselvanA ja. Dispatcher servlet-name> * .rm url-pattern> servlet-mapping> –
globetrotter