Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing latest gson #1186

Open
froderik opened this issue Dec 2, 2024 · 1 comment
Open

Missing latest gson #1186

froderik opened this issue Dec 2, 2024 · 1 comment

Comments

@froderik
Copy link

froderik commented Dec 2, 2024

When updating our code to springboot 3.4.0 out pipeline using the mcr.microsoft.com/azure-functions/java:4-java21 image stopped working. This is due to there being a new dependency in springboot on gson 2.11.0. Packaging this version with the application does not help since it is also included in the jar file used in the docker container. It is seen first and then there is a problem loading classes that does not exist. I tried just now also with the nightly build of the container and that did not work either. Not sure how the process is here but it would be nice to get new build of the java container with the latest gson in it.

@froderik
Copy link
Author

Adding info about a workaround if anyone else comes around with the same problem.

Add gson as a dependency and then exclude the configuration on the application:

@SpringBootApplication(exclude = [GsonAutoConfiguration::class])

in Kotlin and whatever you have in some other language (Java).

This is a hack obvsly - you don't want to add a dependency that you don't need just to make spring not configure it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant