Skip to content

Injecting beans from plugin in application doesn't work #69

Description

@daincredibleholg

Hi.

We are currently building a Spring Boot-based service that will use plugins to make it highly customizable for our users.

One thing we try to do is providing beans via plugins that can be injected by the host application.

From what I found so far, it looks like the plugin manager isn't instantiated yet when Spring tries to resolve all injectable dependencies.
To make this (hopefully) a bit easier to understand, here is an example project

In the given example, I try to inject a bean from the plugin into the main application. This results in the application not even starting, as Spring doesn't seem to find the bean it needs to inject.

Later, we would like to use plugins to provide database connections. So, we would need @Configuration classes and injection working within and from the plugin.

Is this possible? Are there examples I can have a look at?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions