第 1 行:
public ModelAndView viewCustomerDetails(@RequestParam("custId") Integer customerId, @RequestParam("categoryName") String categoryName, HttpServletRequest request) throws BusinessException{
第 2 行:
public ModelAndView viewCustomerDetails(@RequestMapping("custId") Integer customerId, @RequestMapping("categoryName") String categoryName, HttpServletRequest request) throws BusinessException{
我正在仔细研究我的项目代码,@RequestParam
有时@RequestMapping
我发现有时@RequestParam
有些困惑@RequestMapping
。据我了解,两者都会将值分配custId
给customerId
数据成员。
我的jsp文件的一部分:
<form:input mandatory="true" id="CustNameTxt" path="custName" cssClass="txtfield controlWidth" readonly="false" />
为了更好地理解我的问题,我在 Line2 中进行了编辑