-
Hi. I'm using the spring boot starter package. I would like to use the GsonSerializer as the default serializer. Is it possible, and if so, how? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
fjeldev
Sep 13, 2024
Replies: 1 comment
-
I did not look well enough in the documentation. There was a section in the readme explaining how to do this. Code below for someone else in the future that has the same question. class CustomDbSchedulerOptions : DbSchedulerCustomizer {
override fun serializer(): Optional<Serializer> {
return Optional.of(GsonSerializer())
}
}
@Configuration
class DbSchedulerConfig {
@Bean
fun configureDbSchedulerOptions(dataSource: DataSource): DbSchedulerCustomizer {
return CustomDbSchedulerOptions()
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
fjeldev
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I did not look well enough in the documentation. There was a section in the readme explaining how to do this. Code below for someone else in the future that has the same question.