A component required a bean named 'redisTemplate' that could not be found.

2022/1/3 19:07:50

本文主要是介绍A component required a bean named 'redisTemplate' that could not be found.,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

springBoot 配置多个redis数据源 报错 A component required a bean named 'redisTemplate' that could not be found.

原因是 spring找不到默认的redis数据源 需要在 其中一个 bean 上加注解 @Primary



这篇关于A component required a bean named 'redisTemplate' that could not be found.的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程