原文:@RequestParam注解使用:Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.

詳細錯誤信息 解決思路 需要指定 RequestParam 的name屬性值 源碼分析 AbstractNamedValueMethodArgumentResolver.java ...

2018-03-01 15:47 0 10219 推薦指數:

查看詳情

No parameter name specified for argument of type

使用SpringMVC綁定基本類型(如String,Integer等)參數時,應通過@RequestParam注解指定具體的參數名稱,否則,當源代碼在非debug模式下編譯后,運行時會引發HandlerMethodInvocationException異常,這是因為只有在debug模式下編譯 ...

Fri Jul 28 17:26:00 CST 2017 0 2885
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM