Bootstrap

SSM整合框架分页遇到空指针问题

SSM整合框架分页遇到空指针问题

Request processing failed; nested exception is java.lang.NullPointerException

描述 服务器遇到一个意外的情况,阻止它完成请求。

Exception
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:982) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) javax.servlet.http.HttpServlet.service(HttpServlet.java:634) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:741) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:197) org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

解决方法:
//分页工具类
public class Params {
// private Integer pageNumber;//当前页
// private Integer pageSize=2;//每页条数
//类型修改为int
private int pageNumber;//当前页
private int pageSize=2;//每页条数

get和set方法略
}
;