Skip to content

Conversation

@SentryMan
Copy link
Contributor

@SentryMan SentryMan commented Jan 10, 2025

It seems that it was clashing with the built in avaje inject plugin.

  • excludes avaje inject plugins from the jsonb and validator modules

Resolves #3612

It seems that it was clashing with the built in avaje inject plugin
@SentryMan SentryMan changed the title [Validator] Fix Wiring with Avaje Inject [Avaje-Validator] Fix Wiring with Avaje Inject Jan 10, 2025
@jknack
Copy link
Member

jknack commented Jan 10, 2025

I'm not sure about the fix. If you put a named service the single lookup won't work anymore. You need:

require(Validator.class, "validator")

or

@Inject(@Named("validator") Validator validator)

right?

@SentryMan SentryMan marked this pull request as draft January 11, 2025 00:14
@SentryMan SentryMan marked this pull request as ready for review January 11, 2025 00:32
@SentryMan
Copy link
Contributor Author

I'm not sure about the fix. If you put a named service the single lookup won't work anymore. You need:

require(Validator.class, "validator")

or

@Inject(@Named("validator") Validator validator)

right?

You wouldn't need the latter, but I did neglect the former in my initial solution. To solve I just exclude the avaje specific inject plugins

@jknack jknack added this to the 3.6.1 milestone Jan 13, 2025
@jknack jknack merged commit 728f60f into jooby-project:3.x Jan 13, 2025
1 check passed
@SentryMan SentryMan deleted the fix-validation-wring branch January 13, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Documentation improvement about usage of Avaje-Inject + Avaje-Validate in Jooby 3.5.5

2 participants