Skip to content

GH-74 - Discover plugin registries automatically - #154

Open
Adrastopoulos wants to merge 2 commits into
spring-projects:mainfrom
Adrastopoulos:gabriel/automatic-plugin-registries
Open

GH-74 - Discover plugin registries automatically#154
Adrastopoulos wants to merge 2 commits into
spring-projects:mainfrom
Adrastopoulos:gabriel/automatic-plugin-registries

Conversation

@Adrastopoulos

@Adrastopoulos Adrastopoulos commented Sep 4, 2026

Copy link
Copy Markdown

Spring Boot applications currently need @EnablePluginRegistries even when component scanning has registered each plugin implementation. Component scanning discovers implementation beans, but it does not create the typed PluginRegistry bean. So I attempted to address that here.

Added a Spring Boot integration module that discovers the direct Plugin interfaces implemented by Spring beans. The auto-configuration registers one typed registry for each interface and preserves an explicit registry bean, reusing the existing registry factory, bean name, qualifier, and delimiter type rules.

Regarding the module structure, I referenced other Spring projects that own optional Boot integration alongside their core module. For example, Spring Shell publishes spring-shell-core and spring-shell-core-autoconfigure; Spring Statemachine uses spring-statemachine-core and spring-statemachine-autoconfigure. Hence a cosmetic followup to this PR might be renaming /core to spring-plugin-core/ and so on and so forth.

Test plan:

  • ./mvnw -B clean verify -Pci,nullaway

Closes gh-74

Discover plugin interfaces from Spring-managed beans and expose their
registries through Spring Boot auto-configuration. Explicit registry
beans still take precedence.

Closes spring-projectsgh-74

Signed-off-by: Gabriel Hall <gabriel.hall@cox.net>
Follow Spring Shell and Spring Statemachine naming for optional Boot
auto-configuration modules.

Signed-off-by: Gabriel Hall <gabriel.hall@cox.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spring Boot automatic plugin bean registration

1 participant