Skip to content

Commit

Permalink
bug fix: use register api (#4811)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens authored and gl-pix committed Jul 22, 2021
1 parent 104f940 commit 6eb98b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions airbyte-server/src/main/java/io/airbyte/server/ServerApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ public void start() throws Exception {

ResourceConfig rc =
new ResourceConfig()
// add filters
.registerInstances(requestFilters)
.registerInstances(responseFilters)
// request logging
.register(new RequestLogger(mdc))
// api
Expand All @@ -162,6 +159,10 @@ public void configure() {
// https://stackoverflow.com/questions/35669774/jersey-custom-exception-mapper-for-invalid-json-string
.register(JacksonJaxbJsonProvider.class);

// add filters
requestFilters.forEach(rc::register);
responseFilters.forEach(rc::register);

ServletHolder configServlet = new ServletHolder(new ServletContainer(rc));

handler.addServlet(configServlet, "/api/*");
Expand Down

0 comments on commit 6eb98b2

Please sign in to comment.