|
|
@ -166,7 +166,8 @@ public abstract class NamedContextFactory<C extends NamedContextFactory.Specific |
|
|
|
context.setClassLoader(parent.getClassLoader()); |
|
|
|
context.setClassLoader(parent.getClassLoader()); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
context = new GenericApplicationContext(); |
|
|
|
context = AotDetector.useGeneratedArtifacts() ? new GenericApplicationContext() |
|
|
|
|
|
|
|
: new AnnotationConfigApplicationContext(); |
|
|
|
} |
|
|
|
} |
|
|
|
context.getEnvironment().getPropertySources().addFirst( |
|
|
|
context.getEnvironment().getPropertySources().addFirst( |
|
|
|
new MapPropertySource(this.propertySourceName, Collections.singletonMap(this.propertyName, name))); |
|
|
|
new MapPropertySource(this.propertySourceName, Collections.singletonMap(this.propertyName, name))); |
|
|
|