Consider defining a bean of type 'com.hushunlin.utills.RedisUtil' in your configuration.

报错代码如下:


APPLICATION FAILED TO START


Description:

Field redisUtil in com.hsl.mp.handler.MsgHandler required a bean of type ‘com.hushunlin.utills.RedisUtil’ that could not be found.

Action:

Consider defining a bean of type ‘com.hushunlin.utills.RedisUtil’ in your configuration.

Process finished with exit code 1

解决办法:

com.hsl.mp.handler.MsgHandler在此类里面加一个指定扫包@ComponentScan(basePackages = {“com.hushunlin.utills”})
在这里插入图片描述

发布了6 篇原创文章 · 获赞 0 · 访问量 270

猜你喜欢

转载自blog.csdn.net/qq_15149103/article/details/103643836
今日推荐