jetcache
jetcache copied to clipboard
Error creating bean with name 'redissonAutoInit' defined in class path resource
jetcache:
statIntervalMinutes: 15
areaInCacheName: false
hiddenPackages: cn.privchat
local:
default:
type: caffeine #other choose:linkedhashmap / caffeine
keyConvertor: jackson #other choose:fastjson2/jackson
limit: 1000
remote:
default:
type: redisson
keyConvertor: jackson #other choose:fastjson2/jackson
keyPrefix: sp
valueEncoder: java #other choose:kryo/kryo5
valueDecoder: java #other choose:kryo/kryo5
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
host: ${spring.data.redis.host}
port: ${spring.data.redis.port}
使用 jetcache-redisson 和 jetcache-starter-redisson 的时候就这个错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redissonAutoInit' defined in class path resource [com/alicp/jetcache/autoconfigure/RedissonAutoConfiguration.class]: com/alicp/jetcache/redisson/RedissonCacheBuilder
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1788)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
at cn.privchat.server.PrivchatServerApplication.main(PrivchatServerApplication.java:18)
Caused by: java.lang.NoClassDefFoundError: com/alicp/jetcache/redisson/RedissonCacheBuilder
at com.alicp.jetcache.autoconfigure.RedissonAutoConfiguration$RedissonAutoInit.initCache(RedissonAutoConfiguration.java:63)
at com.alicp.jetcache.autoconfigure.AbstractCacheAutoInit.process(AbstractCacheAutoInit.java:75)
at com.alicp.jetcache.autoconfigure.AbstractCacheAutoInit.afterPropertiesSet(AbstractCacheAutoInit.java:54)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1835)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1784)
... 16 common frames omitted
Caused by: java.lang.ClassNotFoundException: com.alicp.jetcache.redisson.RedissonCacheBuilder
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
... 21 common frames omitted
不知道是哪里没检查好。