spring-projects / spring-plugin

Apache License 2.0
444 stars 119 forks source link

Improve @EnablePluginRegistries to not create autowiring ambiguities #18

Closed odrotbohm closed 8 years ago

odrotbohm commented 8 years ago

We currently suffer from BeanDefinition instances registered by @EnablePluginRegistries not being able to communicate the generic types to the container, which creates ambiguities in autowiring.

Current workaround is to rather declare manually defined @Bean-methods like this:

@Configuration
class Config {

  @Bean
  public PluginRegistry<MyPlugin, MyDelimiter> myPluginRegistry(List<? extends MyPlugin> plugins) {
    return OrderAwarePluginRegistry.create(plugins);
  }
}

I've filed SPR-13898 to keep track of this.