@ -59,6 +59,8 @@ import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.GenericApplicationContext ;
import org.springframework.context.support.GenericApplicationContext ;
import org.springframework.core.GenericTypeResolver ;
import org.springframework.core.GenericTypeResolver ;
import org.springframework.core.annotation.AnnotationAwareOrderComparator ;
import org.springframework.core.annotation.AnnotationAwareOrderComparator ;
import org.springframework.core.convert.ConversionService ;
import org.springframework.core.convert.support.ConfigurableConversionService ;
import org.springframework.core.env.CommandLinePropertySource ;
import org.springframework.core.env.CommandLinePropertySource ;
import org.springframework.core.env.CompositePropertySource ;
import org.springframework.core.env.CompositePropertySource ;
import org.springframework.core.env.ConfigurableEnvironment ;
import org.springframework.core.env.ConfigurableEnvironment ;
@ -480,8 +482,10 @@ public class SpringApplication {
protected void configureEnvironment ( ConfigurableEnvironment environment ,
protected void configureEnvironment ( ConfigurableEnvironment environment ,
String [ ] args ) {
String [ ] args ) {
if ( this . addConversionService ) {
if ( this . addConversionService ) {
ConversionService conversionService = ApplicationConversionService
. getSharedInstance ( ) ;
environment . setConversionService (
environment . setConversionService (
ApplicationConversionService . getSharedInstance ( ) ) ;
( ConfigurableConversionService ) conversionService ) ;
}
}
configurePropertySources ( environment , args ) ;
configurePropertySources ( environment , args ) ;
configureProfiles ( environment , args ) ;
configureProfiles ( environment , args ) ;