springboot(已整合redis)整合JetCache2.7版本,CacheManager注入失败
- Dominant language
- Java
- Stars
- 5.6k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
打扰,请教个问题:
springboot(之前整合过redis)整合2.7.0.RC3版本lettuce
pom:
```
com.alicp.jetcache
jetcache-redis-lettuce
${jetcache.latest.version}
com.alicp.jetcache
jetcache-starter-redis-lettuce
${jetcache.latest.version}
```
启动服务异常:
The bean 'cacheManager', defined in class path resource [org/springframework/boot/autoconfigure/cache/JCacheCacheConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [com/alicp/jetcache/autoconfigure/JetCacheAutoConfiguration.class] and overriding is disabled.
Action:
Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
应该是引入springboot的redis依赖导致:
```
org.springframework.boot
spring-boot-starter-data-redis
```
这个该如何处理?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the dependency declarations in the issue and inspect the reported JetCacheAutoConfiguration and JCacheCacheConfiguration bean definitions. Reproduce the startup failure with the shown Spring Boot Redis and JetCache dependencies, then determine which configuration owns the conflicting cacheManager bean and verify the behavior after the documented resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis, spring-boot
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100