ssm框架的重定向问题
点击修改之后重定向到查询页面报错查询的controller
@RequestMapping("/getuser")
public String getUserList(@ModelAttribute("yonghulist") VisitorInfo visitor,@ModelAttribute("pageindex")int pageindex ,HttpServletRequest request,Model m)
{
int pageSize = 10;
int rowCount = dao.getcount();
int pageIndex = pageindex;
PageInfo page=PageUtil.getPageInfo(pageSize, rowCount, pageIndex);
List<VisitorInfo> yonghulist = dao.getUserList(page);
m.addAttribute("yonghulist", yonghulist);
m.addAttribute("page",page);
return "page";
}
修改的controller
@RequestMapping(value={"/user"})
public String getupdateuser(VisitorInfo info,Model m){
int result=dao.updateuser(info);
m.addAttribute("result",result);
return "redirect:getuser";
}
报错信息如下:org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [int]: No default constructor found; nested exception is java.lang.NoSuchMethodException: int.<init>()
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:108)
org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66)
不知道怎么解决,哪个大神帮下忙