本地环境一:springboot 在addInterceptor()反射调用getBean的时候报错: java.lang.NoSuchMethodException: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext.getBean(java.lang.String)  导致interceptor没有加进去。 本地环境二:SpringMVC + tomcat9.0.89 也是addInterceptor反射调用getBean的时候报错NoSuchMethodException。