|
|
@ -408,8 +408,7 @@ public class SpringApplication {
|
|
|
|
Assert.isAssignable(type, instanceClass);
|
|
|
|
Assert.isAssignable(type, instanceClass);
|
|
|
|
Constructor<?> constructor = instanceClass
|
|
|
|
Constructor<?> constructor = instanceClass
|
|
|
|
.getDeclaredConstructor(parameterTypes);
|
|
|
|
.getDeclaredConstructor(parameterTypes);
|
|
|
|
constructor.setAccessible(true);
|
|
|
|
T instance = (T) BeanUtils.instantiateClass(constructor, args);
|
|
|
|
T instance = (T) constructor.newInstance(args);
|
|
|
|
|
|
|
|
instances.add(instance);
|
|
|
|
instances.add(instance);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Throwable ex) {
|
|
|
|
catch (Throwable ex) {
|
|
|
|