-
Notifications
You must be signed in to change notification settings - Fork 8
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
#34 better flyway config #35
Conversation
…bove, optional part below.
# Conflicts: # nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java
…is on the classpath. Spring boot actuator initializes a child application context with using the Configuration class defined in spring.factories.
README.md
Outdated
@@ -179,6 +159,39 @@ This will only work if your application has configured spring-boot-actuator | |||
``` | |||
and if it implements the `org.zalando.nakadiproducer.snapshots.SnapshotEventProvider` interface as a Spring Bean. Otherwise, the library will respond with an error message when you request a snapshot creation. | |||
|
|||
## X-Flow-ID (Optional) |
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.
Some sections have (optional)
, others (Optional)
. I guess this should be unified?
public SnapshotEventCreationEndpoint snapshotEventCreationEndpoint(SnapshotCreationService snapshotCreationService) { | ||
return new SnapshotEventCreationEndpoint(snapshotCreationService); | ||
} | ||
@ManagementContextConfiguration |
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.
What is the effect of this? The javadoc was not that insight-giving to me.
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.
see commit 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.
Okay, the annotation was moved from the outer class (and the spring.factories entry adapted too).
import org.springframework.beans.factory.annotation.Qualifier; | ||
|
||
/** | ||
* Qualifier annotation for a FlywayCallback to be injected in to nakadi-producers Flyway instance. |
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.
Nitpick: nakadi-producers
→ nakadi-producer's
. (Same in NakadiProducerFlywayDataSource.)
} | ||
|
||
@org.springframework.context.annotation.Configuration | ||
public static class Configuration { |
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.
If you name the class e.g. Config
, you can import the annotation.
Though I had problems with @Configuration
classes in Integration tests, they often were activated for other ITs than the intended one too, causing much confusion.
👍 |
1 similar comment
👍 |
Fixes #34.