首页 > 编程语言 > 详细

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

时间:2020-01-10 14:43:25      阅读:189      评论:0      收藏:0      [点我收藏+]

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

技术分享图片

 

 自己试验下

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!