这个问题网上有好多同学都提到这个问题,代码可以运行,但是就是有红线,强迫症不能忍
自己试验下
1、增加一个final编译一下,再删掉就不会出红线了
public class InterceptorConfig implements WebMvcConfigurer { final private TokenInterceptor tokenInterceptor;
2、就是网上流传的,改成warning
SpringBoot学习- 7、问题Could not autowire. No beans of 'xxxx' type found处理
原文:https://www.cnblogs.com/zhaogaojian/p/12175651.html