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

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM