#18 - Explicitly declare bean definitions target type for plugin registries.
We now use the API introduced in Spring Framework 4.3.3 to explicitly declare a ResolvableType for the BeanDefinition of the plugin registries. This allows to autowire registries as PluginRegisty<Foo, …> and PluginRegistry<Bar, …> without using explicit qualifiers.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012 the original author or authors.
|
||||
* Copyright 2012-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -50,9 +50,7 @@ public class EnablePluginRegistriesIntegrationTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Autowired
|
||||
@Qualifier("samplePluginRegistry")
|
||||
PluginRegistry<SamplePlugin, String> registry;
|
||||
@Autowired PluginRegistry<SamplePlugin, String> registry;
|
||||
|
||||
@Test
|
||||
public void registersPluginRegistries() {
|
||||
@@ -60,9 +58,7 @@ public class EnablePluginRegistriesIntegrationTest {
|
||||
}
|
||||
|
||||
@Qualifier("myQualifier")
|
||||
interface AnotherPlugin extends Plugin<String> {
|
||||
|
||||
}
|
||||
interface AnotherPlugin extends Plugin<String> {}
|
||||
|
||||
static class AnotherSamplePluginImplementation implements AnotherPlugin {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user