Skip to content

refactor: ‎README is refactored#801

Open
strelchm wants to merge 1 commit intokagkarlsson:masterfrom
strelchm:spring-props-in-readme-fixed
Open

refactor: ‎README is refactored#801
strelchm wants to merge 1 commit intokagkarlsson:masterfrom
strelchm:spring-props-in-readme-fixed

Conversation

@strelchm
Copy link
Copy Markdown
Contributor

@strelchm strelchm commented Mar 26, 2026

Clarify polling strategy naming between documentation and Spring Boot config and additional readme refactoring

The polling strategy is referred to as fetch-and-lock-on-execute in the main documentation, but configured as fetch in Fluent API and Spring Boot application.properties.
Specifying fetch-and-lock-on-execute in Spring configuration results in startup failure cause the enum expects FETCH or LOCK_AND_FETCH:

***************************
APPLICATION FAILED TO START
***************************

Description:

Failed to bind properties under 'db-scheduler.polling-strategy' to com.github.kagkarlsson.scheduler.PollingStrategyConfig$Type:

    Property: db-scheduler.polling-strategy
    Value: "fetch-and-lock-on-execute"
    Origin: class path resource [application.properties] - 26:31
    Reason: failed to convert java.lang.String to com.github.kagkarlsson.scheduler.PollingStrategyConfig$Type (caused by java.lang.IllegalArgumentException: No enum constant com.github.kagkarlsson.scheduler.PollingStrategyConfig.Type.fetch-and-lock-on-execute)

Action:

Update your application's configuration. The following values are valid:

    FETCH
    LOCK_AND_FETCH

This inconsistency can be confusing for users. Changing the property name from fetch to fetch-and-lock-on-execute would be a breaking change for existing users - that is why the note in docs is the optimal variant.

Fixes

This PR adds explicit links between the two:

  • Adds note in polling strategy section that default strategy is configured as fetch in Fluent API and Spring Boot
  • Adds inline comment in Spring Boot properties example showing fetch corresponds to fetch-and-lock-on-execute
  • Adds "SQL Server, MySQL v8+" to the lock-and-fetch description in the Benchmark test. In the pollUsingLockAndFetch config description, these databases are already listed.

Also additional refactoring:

  • Removes duplicate polling strategy properties in Spring Boot example
  • Replaces corrupted herokuapp Maven Central badge with modern Shields.io badge. Update link to point to central.sonatype.com

Documentation is updated to clarify the mapping, helping users avoid this error.

Reminders

  • Update README and/or examples
  • Ran mvn spotless:apply

cc @kagkarlsson

@strelchm strelchm force-pushed the spring-props-in-readme-fixed branch from e8afb92 to 169cef9 Compare March 26, 2026 17:19
@strelchm strelchm changed the title fix: config duplication and fetch-and-lock-on-execute ambiguity in spring config are fixed refactor: config duplication and fetch-and-lock-on-execute ambiguity in spring config are fixed Mar 26, 2026
@strelchm strelchm force-pushed the spring-props-in-readme-fixed branch from 169cef9 to 6b42d40 Compare March 27, 2026 05:01
@strelchm strelchm changed the title refactor: config duplication and fetch-and-lock-on-execute ambiguity in spring config are fixed refactor: config duplication and fetch-and-lock-on-execute ambiguity in spring config are refactored Mar 27, 2026
@strelchm strelchm force-pushed the spring-props-in-readme-fixed branch from 6b42d40 to 8f7adcd Compare March 28, 2026 11:35
@strelchm strelchm force-pushed the spring-props-in-readme-fixed branch from 8f7adcd to 4d6e37f Compare April 9, 2026 03:23
@strelchm strelchm changed the title refactor: config duplication and fetch-and-lock-on-execute ambiguity in spring config are refactored refactor: ‎README is refactored Apr 11, 2026
@strelchm strelchm force-pushed the spring-props-in-readme-fixed branch from 4d6e37f to c2a2c6a Compare April 18, 2026 11:42
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.

1 participant