uestWrapper.getSession(HttpServletRequestWrapper.java:241) ~[tomcat-embed-core-9.0.13.jar:9.0.13]

uestWrapper.getSession(HttpServletRequestWrapper.java:241) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:564) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:241) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:564) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:241) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:564) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWrapper.java:241) ~[tomcat-embed-core-9.0.13.jar:9.0.13]
	at org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRequest.java:564) ~[tomcat-embed-core-9.0.13.jar:9.0.13]


很长很长很牛逼的错误

原因:
在写拦截器时: 少了“/” 如下
.excludePathPatterns("/",“index.html”,"/user/login");

 @Override
public void addInterceptors(InterceptorRegistry registry) {
    registry.addInterceptor(new LoginHandlerInterceptor()).addPathPatterns("/**")
            .excludePathPatterns("/","/index.html","/user/login");
 }

你可能感兴趣的:(代码错误记录)