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

Spring Boot config #61

Open
bguedel opened this issue May 12, 2021 · 0 comments
Open

Spring Boot config #61

bguedel opened this issue May 12, 2021 · 0 comments

Comments

@bguedel
Copy link

bguedel commented May 12, 2021

I think the docs are probably still lacking OR I just didnt read them well enough; More likely there is no spring specific docs anyways...

Just posting this issue to help people get started with this with a spring boot app that handles webhooks.

import com.fasterxml.jackson.databind.Module; // Need this b/c by default java will want to use the java.lang.Module.
import com.spotify.github.jackson.GithubApiModule;

@Configuration
public class Configuration {
    /**
     * Need to register this bean so that isodates based through the webhook are understood by jackson.
     */
    @Bean
    public Module githubApiModule() {
        return new GithubApiModule();
    }
}
spring:
  jackson:
    property-naming-strategy: SNAKE_CASE # by default jackson wants LOWER_CAMEL_CASE, the events are not configured to deser using snakecase. This configures jackson to expect snakecase instead of camelcase.

These are 2 kind of "gotchas" that we ran into while trying to use this project for webhooks.

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