严重: Servlet.service() for servlet [springmvc] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause
java.lang.NullPointerException
这个bug卡了我一天,试了以下方法均无效:
清除maven仓库重装——无效
重改的maven依赖的pom,去掉冲突的jar——无效。不过学会了用冲突批量修改器:Dependency Analyzer
把所有request指向的变量先置为null再去获取值,然后再判断取到的值是否为空——无效
最后山穷水尽,把run configuration中默认打开的浏览器又chrome换成firefox,就好使了。
猜想是跟拦截器有关,chrome可能初始时有缓存而不能启动拦截器,因此失败的