pull/5074/head
Phillip Webb 9 years ago
parent 5bfccf42c4
commit bbc0dc69eb

@ -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) {

Loading…
Cancel
Save