-
Notifications
You must be signed in to change notification settings - Fork 26
feat: Inconsistent i18n Message Resolution in Spring Cloud Environment #29
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
In a Spring Cloud microservices environment, we are experiencing inconsistent internationalization (i18n) message resolution across services and request contexts.
Specifically:
MessageSource.getMessage(...)works correctly in:- Controllers
- Standard HTTP request threads
- But fails or returns default messages in:
- Async tasks (
@Async) - Reactive contexts (WebFlux)
- Feign client fallback / error decoder
- Global exception handlers
- Scheduled jobs
- Async tasks (
The resolved locale is sometimes:
null- Always
Locale.getDefault() - Or different from the request's
Accept-Languageheader
Expected Behavior
- Locale should be resolved consistently based on:
Accept-Languageheader (for HTTP requests)- Explicitly set
LocaleContext
- i18n messages should work uniformly in:
- Controllers
- Exception handlers
- Async tasks
- Reactive pipelines
- Feign-related components
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Type
Projects
Status
In Progress