When upgrading from Spring Boot 3.3 to 3.4, my app still compiles, but when I run it, crashes with:
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
[2025-01-09 12:36:47.028] - 13568 SEVERE [restartedMain] --- org.springframework.boot.SpringApplication: Application run failed
java.lang.NoClassDefFoundError: com/google/gson/Strictness
When I look at who is using GSON, it's gwt-dev.jar:
[INFO] teamdrift:drift-team-client:gwt-app:1.0-SNAPSHOT
[INFO] +- org.gwtproject:gwt-dev:jar:2.12.1:compile
[INFO] | +- com.google.code.gson:gson:jar:2.6.2:compile
I can fix it by adding the newer version to my server:
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.11.0</version>
</dependency>
And optionally, to clean up so the old version, remove it from my client gwt-dev:
<dependency>
<groupId>org.gwtproject</groupId>
<artifactId>gwt-dev</artifactId>
<exclusions>
<exclusion>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</exclusion>
</exclusions>
</dependency>
Is this the best fix? Or is there something better?
Thanks.