Skip to content

Commit

Permalink
[Validator] Fix Wiring with Avaje Inject
Browse files Browse the repository at this point in the history
It seems that it was clashing with the built in avaje inject plugin
  • Loading branch information
SentryMan committed Jan 10, 2025
1 parent 89a868e commit dcb5ad0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.jooby.Context;
import io.jooby.Extension;
import io.jooby.Jooby;
import io.jooby.ServiceKey;
import io.jooby.StatusCode;
import io.jooby.validation.BeanValidator;

Expand Down Expand Up @@ -159,7 +160,7 @@ public void install(@NonNull Jooby app) {
}

var validator = builder.build();
app.getServices().put(Validator.class, validator);
app.getServices().put(ServiceKey.key(Validator.class, "validator") , validator);
app.getServices().put(BeanValidator.class, new BeanValidatorImpl(validator));

if (!disableDefaultViolationHandler) {
Expand Down

0 comments on commit dcb5ad0

Please sign in to comment.