Skip to content

Spring Boot config #61

Open
Open
@bguedel

Description

@bguedel

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions