Skip to content

Commit 5f17a97

Browse files
committed
Fix the root of the problem
1 parent dcb5ad0 commit 5f17a97

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
lines changed

modules/jooby-avaje-inject/src/main/java/io/jooby/avaje/inject/AvajeInjectModule.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,7 @@ public void install(Jooby application) {
6868
e -> {
6969
var key = e.getKey();
7070
var provider = e.getValue();
71-
if (key.getName() == null) {
72-
beanScope.provideDefault(key.getType(), provider::get);
73-
} else {
74-
beanScope.bean(key.getName(), key.getType(), provider);
75-
}
71+
beanScope.bean(key.getName(), key.getType(), provider);
7672
});
7773

7874
final var environment = application.getEnvironment();

modules/jooby-avaje-jsonb/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
<dependency>
2323
<groupId>io.avaje</groupId>
2424
<artifactId>avaje-jsonb</artifactId>
25+
<exclusions>
26+
<exclusion>
27+
<groupId>io.avaje</groupId>
28+
<artifactId>avaje-jsonb-inject-plugin</artifactId>
29+
</exclusion>
30+
</exclusions>
2531
</dependency>
2632

2733
<dependency>

modules/jooby-avaje-validator/pom.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626
<dependency>
2727
<groupId>io.avaje</groupId>
2828
<artifactId>avaje-validator</artifactId>
29+
<exclusions>
30+
<exclusion>
31+
<groupId>io.avaje</groupId>
32+
<artifactId>avaje-validator-inject-plugin</artifactId>
33+
</exclusion>
34+
<exclusion>
35+
<groupId>io.avaje</groupId>
36+
<artifactId>avaje-validator-http-plugin</artifactId>
37+
</exclusion>
38+
</exclusions>
2939
</dependency>
3040

3141
<dependency>

modules/jooby-avaje-validator/src/main/java/io/jooby/avaje/validator/AvajeValidatorModule.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import io.jooby.Context;
2222
import io.jooby.Extension;
2323
import io.jooby.Jooby;
24-
import io.jooby.ServiceKey;
2524
import io.jooby.StatusCode;
2625
import io.jooby.validation.BeanValidator;
2726

@@ -160,7 +159,7 @@ public void install(@NonNull Jooby app) {
160159
}
161160

162161
var validator = builder.build();
163-
app.getServices().put(ServiceKey.key(Validator.class, "validator") , validator);
162+
app.getServices().put(Validator.class, validator);
164163
app.getServices().put(BeanValidator.class, new BeanValidatorImpl(validator));
165164

166165
if (!disableDefaultViolationHandler) {

0 commit comments

Comments
 (0)