jetcache
jetcache copied to clipboard
使用nacos的动态配置抛异常
在项目中使用注解调用抛出异常,项目启动的时候能够正常获取到nacos中的配置信息,就是使用注解调用的时候抛了异常
/** 缓存 **/
@CreateCache(name = "app::shiro-user", expire = 30, timeUnit = TimeUnit.MINUTES, cacheType = CacheType.BOTH)
@CacheRefresh(refresh = 5, stopRefreshAfterLastAccess = 30, timeUnit = TimeUnit.MINUTES)
private Cache<Long, ActiveUser> activeUserCache;
异常信息
com.alicp.jetcache.CacheConfigException: no local cache builder: default
nacos jetcache.yml
jetcache:
statIntervalMinutes: 15 # 统计间隔时间,单位:分钟
areaInCacheName: false
local:
default:
type: linkedhashmap
keyConvertor: fastjson
remote:
default:
type: redis
keyConvertor: fastjson
valueEncoder: java
valueDecoder: java
poolConfig:
minIdle: 5
maxIdle: 20
maxTotal: 50
host: 127.0.0.1
port: 6379
database: 0
password:
Spring Boot Nacos加载
@NacosPropertySource(dataId = "jetcache.yml")
@Configuration
public class NacosConfig {
}
有大佬解释下这个报错嘛 我也遇到类似的问题 求解答
遇到同样问题,求大佬帮忙解决...