You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(deps): upgrade slf4j to 2.0.17 for Spring Boot 3.5.0 compatibility
Upgrade slf4j-api from 1.7.36 to 2.0.17 to resolve dependency conflicts
when running under Spring Boot 3.5.0 with JDK 17.
## Breaking Changes
- slf4j-api: 1.7.36 → 2.0.17
- logback: 1.2.13 → 1.4.14
- log4j bridge: log4j-slf4j-impl → log4j-slf4j2-impl (2.24.3)
## Changes
### Dependencies (trpc-dependencies-bom/pom.xml)
- Upgrade slf4j.version to 2.0.17
- Upgrade logback.version to 1.4.14
### Core Module (trpc-core/pom.xml)
- Replace log4j-slf4j-impl with log4j-slf4j2-impl for SLF4J 2.0 bridge
### Logger Admin (trpc-logger-admin/pom.xml)
- Replace log4j-slf4j-impl with log4j-slf4j2-impl
### Build Configuration
- Update exclusions in trpc-code-generator and trpc-spring-boot-starter
to reference log4j-slf4j2-impl instead of log4j-slf4j-impl
### TrpcMDCAdapter (trpc-core/.../TrpcMDCAdapter.java)
- Implement SLF4J 2.0 new MDCAdapter interface methods:
- pushByKey(): Support MDC stack operations
- popByKey(): Pop MDC values
- clearDequeByKey(): Clear deque for a key
- getCopyOfDequeByKey(): Get deque copy (returns null for simple Map impl)
- Use reflection to initialize MDC adapter (MDC.mdcAdapter field is no
longer directly accessible in SLF4J 2.0)
- Fix setContextMap() to use parameterized type
- Add Deque and Field imports
## Testing
- ✅ All modules compile successfully (58/58)
- ✅ Dependency tree verified - all slf4j deps are 2.0.17
- ✅ No slf4j 1.7.x residuals found
- ✅ Compatible with JDK 17 and Spring Boot 3.5.0
## Compatibility
- Java: JDK 17+
- Spring Boot: 3.5.0+
- Jakarta EE: 10
- Third-party deps verified: Sentinel, Nacos, Curator, Polaris
Closes #XXX
0 commit comments