Skip to content

Set serializer in spring boot? #535

Closed Answered by fjeldev
fjeldev asked this question in Q&A
Discussion options

You must be logged in to vote

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()
    }
}

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by fjeldev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant