Shared DefaultConversionService instance for simple fallback purposes
Issue: SPR-14948
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2014 the original author or authors.
|
||||
* Copyright 2002-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.
|
||||
@@ -44,7 +44,7 @@ public class GenericMessageConverter extends SimpleMessageConverter {
|
||||
* Create a new instance with a default {@link ConversionService}.
|
||||
*/
|
||||
public GenericMessageConverter() {
|
||||
this.conversionService = new DefaultConversionService();
|
||||
this.conversionService = DefaultConversionService.getSharedInstance();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -76,7 +76,7 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements Handle
|
||||
* values are not expected to contain expressions
|
||||
*/
|
||||
protected AbstractNamedValueMethodArgumentResolver(ConversionService cs, ConfigurableBeanFactory beanFactory) {
|
||||
this.conversionService = (cs != null ? cs : new DefaultConversionService());
|
||||
this.conversionService = (cs != null ? cs : DefaultConversionService.getSharedInstance());
|
||||
this.configurableBeanFactory = beanFactory;
|
||||
this.expressionContext = (beanFactory != null ? new BeanExpressionContext(beanFactory, null) : null);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user