当前位置: 代码迷 >> 综合 >> Spring MVC接收参数的方式
  详细解决方案

Spring MVC接收参数的方式

热度:71   发布时间:2024-01-15 10:34:17.0

第一种接收参数的方式:

1、com.venustech.entity.User实体类属性:

Integer id  、String username、String password

2、controller控制层

package com.venustech.controller;


import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.Mapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.servlet.ModelAndView;


import com.venustech.entity.User;


@Contro

  相关解决方案