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