SpringBoot学习- 7、问题Could not autowire. No beans of 'xxxx' type found处理

SpringBoot学习足迹

这个问题网上有好多同学都提到这个问题,代码可以运行,但是就是有红线,强迫症不能忍

 

 自己试验下

1、增加一个final编译一下,再删掉就不会出红线了

public class InterceptorConfig implements WebMvcConfigurer {

    final
    private TokenInterceptor tokenInterceptor;

2、就是网上流传的,改成warning

 下一篇:SpringBoot学习- 8 集成Shiro

 

posted @ 2020-01-10 13:17  zhaogaojian  阅读(1776)  评论(0编辑  收藏  举报