Score
0
Watch 3K Star 6.5K Fork 3.2K

卓源软件 / JeeSite 4.xJavaAGPL-3.0

在util工具类获取redisTemplate

Open
Barry  Opened this issue

怎么在一个util工具类里获取项目的redisTemplate实例
RedisTemplate redisTemplate = SpringUtils.getBean(RedisTemplate.class);
这样报错:
org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'org.springframework.data.redis.core.RedisTemplate, ?>' available: expected single matching bean but found 3: stringSerializerRedisTemplate,redisTemplate,stringRedisTemplate

total 1 participants

Comments (0)

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority

Help Search