Skip to content

Conversation

salaboy
Copy link
Collaborator

@salaboy salaboy commented Sep 30, 2025

Description

Setting the default values for DaprClient Spring Boot properties.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature has been discussed prior to implementation.

Please reference the issue this PR will close: #1566

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@salaboy salaboy requested review from a team as code owners September 30, 2025 13:00
Signed-off-by: salaboy <Salaboy@gmail.com>
@salaboy salaboy force-pushed the 1566-setting-default-values-for-prop branch from 966eb4f to 0ba7448 Compare September 30, 2025 13:00
Copy link
Contributor

@mcruzdev mcruzdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@salaboy
Copy link
Collaborator Author

salaboy commented Sep 30, 2025

@dapr/maintainers-java-sdk @dapr/approvers-java-sdk without setting these defaults, Spring Boot doesn't know where to find Dapr when running the application. This force the user to set the properties when they shouldn't.

@salaboy salaboy marked this pull request as draft September 30, 2025 13:12
@salaboy salaboy marked this pull request as ready for review September 30, 2025 13:56
Copy link
Contributor

@siri-varma siri-varma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Oct 3, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.44%. Comparing base (d759c53) to head (5957483).
⚠️ Report is 228 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1567      +/-   ##
============================================
+ Coverage     76.91%   78.44%   +1.52%     
- Complexity     1592     1908     +316     
============================================
  Files           145      215      +70     
  Lines          4843     5831     +988     
  Branches        562      649      +87     
============================================
+ Hits           3725     4574     +849     
- Misses          821      916      +95     
- Partials        297      341      +44     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@artur-ciocanu artur-ciocanu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@salaboy I like the idea, however I think the endpoint syntax should be a little bit different. It should include the port as well.

I have looked in these places:

In both of these places the expectation is that we provide the port as part of endpoint.

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "dapr.client")
public class DaprClientProperties {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wondering if an endpoints shouldn't have the port. As far as I remember there is some parsing logic in the network utils.


});
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could remove unnecessary new lines.

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.

DaprClientProperties don't have defaults set
4 participants