Skip to content
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

feat: Support custom AutoConfigureBeans, such as default local cache config #783

Merged
merged 1 commit into from
May 23, 2023

Conversation

javalover123
Copy link
Contributor

No description provided.

@areyouok
Copy link
Collaborator

why?

@javalover123
Copy link
Contributor Author

javalover123 commented May 22, 2023

比如 多模块项目,希望在 common模块,通过代码设置 默认的本地缓存配置(如使用 Caffeine),避免其他每个模块都 通过配置文件设置本地缓存 使用哪种存储

@areyouok
Copy link
Collaborator

你直接弄个Map<String, CacheBuilder> localCacheBuilders类型的bean,让spring自动注入到autoConfigureBeans里面行么

@javalover123
Copy link
Contributor Author

你直接弄个Map<String, CacheBuilder> localCacheBuilders类型的bean,让spring自动注入到autoConfigureBeans里面行么

AutoConfigureBeans 是 new 出来的,不能注入 Map<String, CacheBuilder> localCacheBuilders

@areyouok
Copy link
Collaborator

你试试?

@javalover123
Copy link
Contributor Author

你试试?

试了,不行

@javalover123
Copy link
Contributor Author

注入 GlobalCacheConfig 也不行,会导致 JetCacheAutoConfiguration 不执行(包括 SpringConfigProvider、CacheManager 的初始化)

image

@areyouok areyouok merged commit 8de0ea4 into alibaba:master May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants