-
Notifications
You must be signed in to change notification settings - Fork 15.4k
RedisConfig keyGenerator 问题 #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
method.getDeclaringClass().getName() 可以获取定义方法的接口名,一般情况也可以适用,或者替换字符串$$EnhancerBySpringCGLIB$$4a45e1b5 中后面随机字符部分,这样处理。目前因为字典部分的缓存是不过期的,开发情况下这边的缓存会越来越多,正式环境也会有问题,如果是集群也是会无法命中缓存。 |
3q |
@configuration
} |
|
lexmeng
added a commit
to lexmeng/jeecg-boot
that referenced
this issue
Jun 30, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RedisConfig keyGenerator 中target.getClass().getName() 获取到的可能是动态代理生成的类名,每次启动后可能不一致 ,造成同Class 同方法生成的key不一致。
aop:
proxy-target-class: false
的时候是相同的,如果为true ,getClass().getName()会有$$EnhancerBySpringCGLIB$$4a45e1b5 这样的类名出现。
The text was updated successfully, but these errors were encountered: