Skip to content

Fix Spring Boot 4.x ClassNotFoundException for OAuth2ClientProperties#887

Merged
prachi-okta merged 1 commit intomasterfrom
bugfix/oauth2-classnotfound-spring-boot-4x
Feb 2, 2026
Merged

Fix Spring Boot 4.x ClassNotFoundException for OAuth2ClientProperties#887
prachi-okta merged 1 commit intomasterfrom
bugfix/oauth2-classnotfound-spring-boot-4x

Conversation

@prachi-okta
Copy link
Copy Markdown
Contributor

Use reflection to dynamically load OAuth2ClientProperties class instead of direct import. This fixes the ClassNotFoundException that users encounter when upgrading to Spring Boot 4.x, allowing graceful fallback when the class is not available on the classpath.

The fix ensures compatibility with both Spring Boot 3.x (direct import path) and 4.x (new module structure) without breaking existing functionality.

Fixes issue #864 - users unable to use 3.0.9 with Spring Boot 4.x

Use reflection to dynamically load OAuth2ClientProperties class instead of
direct import. This fixes the ClassNotFoundException that users encounter
when upgrading to Spring Boot 4.x, allowing graceful fallback when the
class is not available on the classpath.

The fix ensures compatibility with both Spring Boot 3.x (direct import
path) and 4.x (new module structure) without breaking existing functionality.

Fixes issue #864 - users unable to use 3.0.9 with Spring Boot 4.x
Copy link
Copy Markdown
Contributor

@aniket-okta aniket-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

@prachi-okta prachi-okta merged commit 44fb98d into master Feb 2, 2026
3 checks passed
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.

2 participants