You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jsonb and the Validator are 2 good examples. For something to be a plugin:
It only provides one component
The component it provides must not have any dependency
The component it provides is not named/qualified and has @Secondary priority so will be used only when nothing else provides the same component
So we'd use a Plugin rather than a full blown avaje-inject module with @InjectModules etc because with the plugin it ends up as approximately 2 lines of code and a full blown avaje-inject module instead looks a bit more like serious overkill.
Yeah I figured. I'm getting a dependency not provided error on my javalin repo when I use the new validator. I guess the service loader can't load the plugins at compile time. #263 fixes this.
This allows plugins to add a 'default provider' (as a
@Secondary
) that can be used when nothing else provides that dependency.For example, Jsonb can have a plugin to use
() -> Jsonb.builder().build()
as a provider like:The text was updated successfully, but these errors were encountered: