Skip to content

Commit

Permalink
Update AvajeInjectModule.java
Browse files Browse the repository at this point in the history
  • Loading branch information
SentryMan committed Jan 11, 2025
1 parent 5f17a97 commit 6feaa32
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ public void install(Jooby application) {
e -> {
var key = e.getKey();
var provider = e.getValue();
beanScope.bean(key.getName(), key.getType(), provider);
if (key.getName() == null) {
beanScope.provideDefault(key.getType(), provider::get);
} else {
beanScope.bean(key.getName(), key.getType(), provider);
}
});

final var environment = application.getEnvironment();
Expand Down

0 comments on commit 6feaa32

Please sign in to comment.