写法一: public ControllerResult orderProcess(@RequestParam(value = "showkerTaskId") Long showkerTaskId,
@RequestParam(value = "showkerId") Long showkerId) {
写法二:
public ControllerResult orderProcess( Long showkerTaskId, Long showkerId) {
在controller中写参数时不用@RequestParam注释也可以。为什么??
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
6条回答 默认 最新
yflyfox 2017-09-04 08:12关注只要你前台form表单中name属性和controller中参数写得一样就不需要@requestParam。spring会自动帮你处理
评论 打赏 举报解决 7无用