zklfire37
zklfire37
2015-10-24 12:36

关于springmvc的问题。

2
  • spring

我使用的是springmvc框架,在项目启动后,首次发送url请求的时候,控制台输出如下。
2015-10-24 20:27:44 [org.springframework.web.servlet.DispatcherServlet]-[INFO] FrameworkServlet 'ssdlxt': initialization started
2015-10-24 20:27:44 [org.springframework.web.context.support.XmlWebApplicationContext]-[INFO] Refreshing WebApplicationContext for namespace 'ssdlxt-servlet': startup date [Sat Oct 24 20:27:44 CST 2015]; parent: Root WebApplicationContext
2015-10-24 20:27:44 [org.springframework.beans.factory.xml.XmlBeanDefinitionReader]-[INFO] Loading XML bean definitions from file [/Users/zhukally/Documents/apache-tomcat-7.0.64/webapps/ssdlxt/WEB-INF/classes/config/ssdlxt-servlet.xml]
2015-10-24 20:27:44 [org.springframework.context.annotation.ClassPathBeanDefinitionScanner]-[INFO] JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
2015-10-24 20:27:44 [org.springframework.beans.factory.support.DefaultListableBeanFactory]-[INFO] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5f03ed7f: 2015-10-24 20:27:44 [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]-[INFO] Mapped "{[/acl/roleSave.html],methods=[],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.web.servlet.ModelAndView com.laymore.controller.acl.AclRoleController.roleSave(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse,com.laymore.domain.AclRoleCommand,org.springframework.web.servlet.mvc.support.RedirectAttributes) throws java.lang.Exception
,不知道为什么最后会带有个java.lang.Exception异常。

以下是java后台代码:
@Controller
@RequestMapping(value="/acl")
public class AclUserController extends BaseController{
@RequestMapping(value="userManage.html")
public ModelAndView userManage(HttpServletRequest request,@ModelAttribute AclUserCommand command,HttpServletResponse response)throws Exception{
ModelAndView mv = new ModelAndView("acl/userList.jsp");
return mv;
}

@RequestMapping(value="getUserList.html")
public ModelAndView getUserList(HttpServletRequest request,@ModelAttribute AclUserCommand command,HttpServletResponse response)throws Exception{
    IAclUserService aclUserService = (IAclUserService)ProjectContext.getBean("aclUserService");
    String currentPage = request.getParameter("page");//jquery-easyui 传递的参数 第几页
    int pageSize = Integer.parseInt(request.getParameter("rows"));//jquery-easyui 传递的参数 每页数量
    super.setPageSize(pageSize);
    super.setPageIndex(currentPage);//第几页,同时设置startIndex
    UserInfo userInfo = (UserInfo)request.getSession().getAttribute("userInfo");
    command.setUserInfo(userInfo);
    PaginationSupport ps = aclUserService.findAclUserByPagination(super.getPageSize(), super.getStartIndex(), command); 
    return mv;
}
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答

为你推荐

换一换