Skip to content

Fix #1270: Support dash-case for oauth2.clientRegistrationId#1312

Merged
ryanjbaxter merged 1 commit intospring-cloud:4.3.xfrom
hun-cloud:gh-1270-oauth2-dash-case-support-4.3.x
Jan 15, 2026
Merged

Fix #1270: Support dash-case for oauth2.clientRegistrationId#1312
ryanjbaxter merged 1 commit intospring-cloud:4.3.xfrom
hun-cloud:gh-1270-oauth2-dash-case-support-4.3.x

Conversation

@hun-cloud
Copy link
Copy Markdown
Contributor

Description

This PR fixes #1270 by adding support for dash-case (kebab-case) property binding for spring.cloud.openfeign.oauth2.clientRegistrationId.

Currently, the OAuth2 configuration only accepts camelCase format (clientRegistrationId), which is inconsistent with other Spring Boot properties that support relaxed binding (dash-case, snake_case, etc.).

Changes

  • Created FeignOAuth2Properties class with @ConfigurationProperties annotation
  • Replaced @Value injection with FeignOAuth2Properties in FeignAutoConfiguration
  • Enabled relaxed binding for OAuth2 configuration properties

Behavior

Before

spring:
cloud:
openfeign:
oauth2:
clientRegistrationId: fancy # ✅ Works
client-registration-id: fancy # ❌ Does not work

…gh-1270.

- Create FeignOAuth2Properties with @ConfigurationProperties
- Replace @value with FeignOAuth2Properties injection
- Enable relaxed binding for OAuth2 configuration

Signed-off-by: jaehun lee <[email protected]>
@hun-cloud hun-cloud force-pushed the gh-1270-oauth2-dash-case-support-4.3.x branch from eda159c to 34f5991 Compare January 15, 2026 15:48
@ryanjbaxter ryanjbaxter merged commit a362572 into spring-cloud:4.3.x Jan 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The configuration value spring.cloud.openfeign.oauth2.clientRegistrationId is only accepted with CamelCase and not with dash-case

4 participants