Open Alos opened 6 months ago
This may not be a bug on spring-cloud-gcp.
From your stacktrace, looks like issue is with Gson not be able do conversion to json correctly. One option is to customize the Gson bean. You might want to try customization options via configuration properties or provide a customized bean of type Gson. Refer to this section in documentation.
You might need to add --add-opens java.base/java.time=ALL-UNNAMED
the jvm args.
Feels like this should be setup by default if you are using Spring Cloud GCP and Spanner
On Thu, Apr 25, 2024, 7:22 PM Mike Eltsufin @.***> wrote:
You might need to add --add-opens java.base/java.time=ALL-UNNAMED the jvm args.
— Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/spring-cloud-gcp/issues/2576#issuecomment-2078514506, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAGG5GY6WGHMVKGQV6NZW3Y7G26PAVCNFSM6AAAAABCXHH4EOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZYGUYTINJQGY . You are receiving this because you authored the thread.Message ID: @.***>
Maybe we can configure a Gson type adapter for java.time.Instant
by default. It's worth looking into. We're open to contributions for this.
Hello @meltsufin please have a look: https://github.com/GoogleCloudPlatform/spring-cloud-gcp/pull/2841
Spring Boot 3.2.2 Spring Cloud GCP 5.0.1 Spring Cloud 2023.0.0 Java 21
If you have a model that looks like this:
The parent animal:
The column:
A
Cat
that inherits fromAnimal
:Trying to create a Cat and saving it:
Causes an issue: