AbstractApplicationContext registers default embedded value resolver
Issue: SPR-14140
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 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.
|
||||
@@ -209,6 +209,13 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
|
||||
*/
|
||||
void addEmbeddedValueResolver(StringValueResolver valueResolver);
|
||||
|
||||
/**
|
||||
* Determine whether an embedded value resolver has been registered with this
|
||||
* bean factory, to be applied through {@link #resolveEmbeddedValue(String)}.
|
||||
* @since 4.3
|
||||
*/
|
||||
boolean hasEmbeddedValueResolver();
|
||||
|
||||
/**
|
||||
* Resolve the given embedded value, e.g. an annotation attribute.
|
||||
* @param value the value to resolve
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 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.
|
||||
@@ -798,6 +798,11 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
|
||||
this.embeddedValueResolvers.add(valueResolver);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasEmbeddedValueResolver() {
|
||||
return !this.embeddedValueResolvers.isEmpty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String resolveEmbeddedValue(String value) {
|
||||
String result = value;
|
||||
|
||||
Reference in New Issue
Block a user