-
Notifications
You must be signed in to change notification settings - Fork 69
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
APP-2814 SpringBoot Starter setup #186
APP-2814 SpringBoot Starter setup #186
Conversation
…st Request/Reply SpringBoot demo, tests are not implemented yet
…ot configured), simplified application.yaml
…ot-module-setup # Conflicts: # symphony-bdk-core/src/main/java/com/symphony/bdk/core/SymphonyBdk.java # symphony-bdk-core/src/main/java/com/symphony/bdk/core/client/ApiClientFactory.java
@@ -0,0 +1,15 @@ | |||
domain: devx1.symphony.com |
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.
+1 on reusing the same format
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.
idea for later, provide properties documentation with https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-configuration-metadata.html
and validation with javax.validation
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.
Already in place actually : https://github.com/SymphonyPlatformSolutions/symphony-api-client-java/pull/186/files#diff-ff7ac3e8e0ec4f8c75d855be89102922R201 but I need to rework on the configuration bean
* </p> | ||
* | ||
* <p> | ||
* Those beans are not intended to be used by end-developers. They are injected into the Spring application context |
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.
In that case do we want to make them bean and put them in the context? (vs creating them manually where needed, i.e in BdkServiceConfig
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.
I think that : "just in case", I'd feel more confident to have them injected in the context.
Actually, I already imagine a customer request saying: "oh we need to call this API (such as DLP, Security...) but the service does not already exists". In this situation we could easily reply by : OK you just have to inject this bean and this bean and you'll be able to proceed to the API call, the service layer will come later.
Maybe I should refine this Javadoc comment
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.
ok, I'll guess we won't document that they exist then
* Asynchronous execution of the {@link DatafeedService#start()} method. | ||
*/ | ||
public void start() { | ||
Executors.newSingleThreadExecutor().submit(() -> { |
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.
just to make stacktraces easier to read we would use Thread.currentThread().setName(); (or use a custom thread factory) to set a meaningful thread's name
...ing-boot-example/src/main/java/com/symphony/bdk/examples/spring/RequestReplyApplication.java
Outdated
Show resolved
Hide resolved
Do you keep a wish list somewhere for the BDK where we could track ideas and improvements? |
symphony-bdk-examples/bdk-spring-boot-example/src/main/resources/application.yaml
Show resolved
Hide resolved
...spring/bdk-core-starter/src/main/java/com/symphony/bdk/spring/SymphonyBdkCoreProperties.java
Outdated
Show resolved
Hide resolved
…ot-module-setup # Conflicts: # symphony-bdk-core/src/main/java/com/symphony/bdk/core/SymphonyBdk.java # symphony-bdk-core/src/main/java/com/symphony/bdk/core/auth/impl/BotAuthenticatorRsaImpl.java
symphony-bdk-core/src/main/java/com/symphony/bdk/core/auth/impl/BotAuthenticatorRsaImpl.java
Show resolved
Hide resolved
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.
LGTM!
Description
This PR brings a very first integration of the BDK Core layer within a SpringBoot Starter module. Also, a BOM module (
symphony-bdk-bom
) has been created in order to simplify dependency management across the BDK project.Example
An example application have been created in order to demonstrate how to implement a very simple Request/Reply Bot using the BDK SpringBoot Starter.
Only 2 files are required in order to setup the application:
application.yaml
that contains the configuration of the Symphony environment (e.g.BdkConfig
)RequestReplyApplication.java
main class that contains the Bot business logicapplication.yaml
RequestReplyApplication.java