-
Notifications
You must be signed in to change notification settings - Fork 228
Adds autoconfiguration for springboot apps. #459
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /* | ||
| * Copyright (c) Microsoft Corporation. | ||
| * Licensed under the MIT License. | ||
| */ | ||
|
|
||
| package io.dapr.springboot; | ||
|
|
||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; | ||
| import org.springframework.context.annotation.ComponentScan; | ||
| import org.springframework.context.annotation.Configuration; | ||
|
|
||
| /** | ||
| * Dapr's Spring Boot AutoConfiguration. | ||
| */ | ||
| @Configuration | ||
| @ConditionalOnWebApplication | ||
| @ComponentScan("io.dapr.springboot") | ||
| public class DaprAutoConfiguration { | ||
| } | ||
|
Comment on lines
+12
to
+19
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this be a breaking change? If not, you could send a PR after this. You have more knowledge about spring boot than me.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, we can release this version this time, and make additional improments in the future.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. That will also give you time to prepare a PR with your ideas. This one was great BTW. Thanks a lot. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ | ||
| io.dapr.springboot.DaprAutoConfiguration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful of this segment, this will override
okhttpversion set indapr-sdk, because spring boot also makes their version declaration inspring-boot-depencies, which conficts with dapr's.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this one I am OK since users would need to solve a version conflict too. If this becomes a problem we would know in our integration tests. Thanks for pointing this out. Learned one more thing.