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
{{ message }}
Repository navigation
spring-boot-starter: configuration binding fails with Jackson 2.21 #150
Using tRPC-Java 2.0.5 on the JDK17/Springboot3 line with Jackson Databind 2.21.4 fails when TRpcConfigurationBindResult initializes.
Reproduction
Set the Jackson runtime to core/databind 2.21.4 and annotations 2.21, then convert a configuration object without starting a Spring context or RPC server:
TRpcConfigurationPropertiesproperties = newTRpcConfigurationProperties();
properties.getGlobal().setEnvName("test-env");
Map<String, Object> result = newTRpcConfigurationBindResult(properties).toMap();
Expected: the global configuration contains env_name=test-env.
Actual: class initialization fails with java.lang.NoSuchFieldError: SNAKE_CASE, because the binder references the removed PropertyNamingStrategy.SNAKE_CASE field.
The proposed fix uses PropertyNamingStrategies.SNAKE_CASE, preserving snake_case configuration keys and extension-map keys. It does not require a Jackson version bump in tRPC itself.
Reproduced on macOS/aarch64 with Amazon Corretto 17.0.20.1 and 21.0.5. The unchanged implementation passes the same two regression tests with Jackson 2.15.2 and 2.18.2 but fails with 2.21.4. The proposed implementation passes all three versions. These checks cover configuration conversion only.
Related pull request: #151 (target: JDK17/Springboot3).
Activity