Skip to content

Commit 4ebc43e

Browse files
authored
Inject ResourceService into Dropwizard runtime (#1077)
Resolves #963
1 parent 3bba370 commit 4ebc43e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

components/dropwizard/src/main/java/org/trellisldp/dropwizard/AbstractTrellisApplication.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,17 @@ public void run(final T config, final Environment environment) throws Exception
156156
@Override
157157
protected void configure() {
158158
bind(webac).to(WebAcService.class);
159-
bind(getServiceBundler().getResourceService()).to(ResourceService.class);
160159
}
161160
});
162161
});
163162

163+
environment.jersey().register(new AbstractBinder() {
164+
@Override
165+
protected void configure() {
166+
bind(getServiceBundler().getResourceService()).to(ResourceService.class);
167+
}
168+
});
169+
164170
// WebSub
165171
ofNullable(config.getHubUrl()).ifPresent(hub -> {
166172
final WebSubHeaderFilter webSubFilter = new WebSubHeaderFilter();

0 commit comments

Comments
 (0)