Closed michael4screen closed 1 month ago
It looks like #492 might have to be reverted @NicklasWallgren I can reproduce. Not familiar with how lazy-loading in Spring works exactly, so not sure what the fix might be.
Not sure why it would suddenly need to use the default constructor when it normally does not seem to.
@kagkarlsson The eagerDbSchedulerStarter
needs to be declared as a static method, as it's defined in the same AutoConfiguration
class as the DbSchedulerStarter
bean, which has a args-constructor.
My bad - it works fine in our externalized configuration (since it's in a separate configuration class with a no-args constructor). I'll open a PR.
NOTE: Beans of this type will be instantiated very early in the spring application lifecycle so they should generally be declared static and not have any dependencies.
Ok, thanks, will have a look 👍
🎉 This issue has been resolved in v14.0.3
(Release Notes)
Expected Behavior
Upgrade to version
14.0.1
is a patch version and does not include breaking changes.Current Behavior
We are running spring boot integration tests with
spring.main.lazy-initialization: true
Context cannot be loaded anymore:The root cause is this change, to not eagerly load the DbSchedulerStarter: https://github.com/kagkarlsson/db-scheduler/pull/492/files
For bug reports
Context