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

A Cloud Config Client for SpringBoot, like Spring Cloud Vault #1225

Open
lony2003 opened this issue Mar 3, 2025 · 3 comments · May be fixed by #1230
Open

A Cloud Config Client for SpringBoot, like Spring Cloud Vault #1225

lony2003 opened this issue Mar 3, 2025 · 3 comments · May be fixed by #1230
Assignees
Milestone

Comments

@lony2003
Copy link

lony2003 commented Mar 3, 2025

Describe the proposal

Currently, the Dapr Java SDK has significantly improved support for Spring Boot. It's time to integrate Dapr's secret store and configuration as a backend for Spring Cloud Config.

The currently popular method for importing cloud config is through the spring.config.import configuration. According to the specification, a prefix is required. Since Dapr has two types of configurations (secret store and configuration), it might be necessary to distinguish between these two.

for example:

dapr:secret:dapr-config-example.properties?refreshEnabled=true
dapr:config:dapr-config-example.properties?refreshEnabled=true

By the way, Dapr Configuration api supports subscribe update bot Secret Store is not according to the code. So do secret store need to be refresh?

Additionally, because cloud config runs during the bootstrap phase, it's not possible to use @Autowired to generate a DaprClient; it needs to be created manually. Whether users are allowed to import configurations different from the @Autowired DaprClient during this period is also a topic worth discussing.

Finally, how to handle cases where the corresponding data is not retrieved (e.g., throwing an error directly, running without configuration, or updating after going live) is another area that needs discussion.

@lony2003 lony2003 linked a pull request Mar 4, 2025 that will close this issue
3 tasks
lony2003 added a commit to fangkehou-team/java-sdk that referenced this issue Mar 4, 2025
…dcoded prefix(dapr#1225)

create a public static final value PROPERTY_PREFIX in DaprClientProperties
change the prefix value in the ConfigurationProperties to DaprClientProperties.PROPERTY_PREFIX
Dapr Cloud Config rely on that.

Signed-off-by: lony2003 <[email protected]>
lony2003 added a commit to fangkehou-team/java-sdk that referenced this issue Mar 4, 2025
…of Spring Cloud Config(dapr#1225)

Originally from https://github.com/fangkehou-team/dapr-spring, this library created a backend of SpringCloudConfig just like SpringCloudVault.
The original library only uses secret store as config store api is not stable at that time.
As the configuration api is stable now, the config loader using that api would be implemented later.

Signed-off-by: lony2003 <[email protected]>
@cicoyle cicoyle added this to the v1.15 milestone Mar 6, 2025
@seal90
Copy link
Contributor

seal90 commented Mar 31, 2025

Cool I also want to add this feature.
When I saw boot cloud, I thought it was implemented based on Spring Cloud. The configuration capability in Spring is implemented in the cloud, and the existence of DAPR makes applications unaware of the cloud, so this feels a bit ambiguous.

@lony2003
Copy link
Author

Cool I also want to add this feature.
When I saw boot cloud, I thought it was implemented based on Spring Cloud. The configuration capability in Spring is implemented in the cloud, and the existence of DAPR makes applications unaware of the cloud, so this feels a bit ambiguous.

@seal90 In Official Document, Spring Cloud means that this series of libraries are used for distributed systems development, so strictly speaking, I think all dapr spring libraries can be named with Spring Cloud.

lony2003 added a commit to fangkehou-team/java-sdk that referenced this issue Apr 3, 2025
…dcoded prefix(dapr#1225)

create a public static final value PROPERTY_PREFIX in DaprClientProperties
change the prefix value in the ConfigurationProperties to DaprClientProperties.PROPERTY_PREFIX
Dapr Cloud Config rely on that.

Signed-off-by: lony2003 <[email protected]>
lony2003 added a commit to fangkehou-team/java-sdk that referenced this issue Apr 3, 2025
…of Spring Cloud Config(dapr#1225)

Originally from https://github.com/fangkehou-team/dapr-spring, this library created a backend of SpringCloudConfig just like SpringCloudVault.
The original library only uses secret store as config store api is not stable at that time.
As the configuration api is stable now, the config loader using that api would be implemented later.

Signed-off-by: lony2003 <[email protected]>
@seal90
Copy link
Contributor

seal90 commented Apr 10, 2025

Because we are extending based on springboot, I believe that using 'dapr. configuration' is superior to 'dapr. cloudconfig'
The word 'configuration' used in both documentation and code, for example https://docs.dapr.io/getting-started/quickstarts/configuration-quickstart/ https://github.com/dapr/java-sdk/blob/master/examples/src/main/java/io/dapr/examples/configuration/ConfigurationClient.java
Yes, due to the special nature of the word 'configuration', it may be confused with Spring configuration parameters, but the expression 'DaperConfiguration' should be understandable to most people who understand dapr.

Cool I also want to add this feature.
When I saw boot cloud, I thought it was implemented based on Spring Cloud. The configuration capability in Spring is implemented in the cloud, and the existence of DAPR makes applications unaware of the cloud, so this feels a bit ambiguous.

@seal90 In Official Document, Spring Cloud means that this series of libraries are used for distributed systems development, so strictly speaking, I think all dapr spring libraries can be named with Spring Cloud.

Because we are extending based on springboot, I believe that using 'dapr. configuration' is superior to 'dapr. cloudconfig'
The word 'configuration' used in both documentation and code, for example https://docs.dapr.io/getting-started/quickstarts/configuration-quickstart/ https://github.com/dapr/java-sdk/blob/master/examples/src/main/java/io/dapr/examples/configuration/ConfigurationClient.java
Yes, due to the special nature of the word 'configuration', it may be confused with Spring configuration parameters, but the expression 'DaperConfiguration' should be understandable to most people who understand dapr.

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 a pull request may close this issue.

3 participants