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

Sentinel DataSource 是否考虑增加一个基于Spring Resource的数据源 #3018

Open
ruansheng8 opened this issue Jan 9, 2023 · 0 comments
Labels
area/data-source Issues or PRs related to data-source extension kind/feature Category issues or prs related to feature request.

Comments

@ruansheng8
Copy link
Contributor

ruansheng8 commented Jan 9, 2023

Issue Description

image

目前sentinel支持的数据源相对比较全面 , 但是似乎对于Spring Resource方式的数据加载没有做支持 (只提供了FileRefreshableDataSourceFileInJarReadableDataSource 两种方式)

主要是Spring Boot 打成Jar包后运行时,不能直接使用读文件的时候去加载文件数据 , 虽然目前提供的FileInJarReadableDataSource可以读到Jar里面的文件内容,但FileInJarReadableDataSource在Spring Boot中用起来似乎显得很奇怪 (Spring Boot项目需要获取当前自己正在运行的Jar包路径,然后拼接对应的文件地址) , 如果sentinel配置文件是在其他Jar包里面那获取可能就更麻烦了.

alibaba/spring-cloud-alibaba#3033
alibaba/spring-cloud-alibaba#462

Describe what you expected to happen

是否考虑新增一个支持 Spring Resource 方式的数据源加载方式 , 这样对于Spring Boot项目的对接实际上会友好很多 , 第三方框架要对接sentinel直接传入一个Resource对象即可 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/data-source Issues or PRs related to data-source extension kind/feature Category issues or prs related to feature request.
Projects
None yet
Development

No branches or pull requests

2 participants