INT-3853: Fix ${} resolution for Ann & XML mix

JIRA: https://jira.spring.io/browse/INT-3853

Previously the placeholder definitions for the Messaging Annotation weren't be resolved
if we use `<context:property-placeholder>` instead of `@PropertySource`.

Fix `MessagingAnnotationPostProcessor` and its "kindergarten" to use
`beanFactory.resolveEmbeddedValue()` instead of `environment.resolvePlaceholders()`.
This commit is contained in:
Artem Bilan
2015-10-15 19:02:08 -04:00
committed by Gary Russell
parent 6d9e36e47f
commit 56374212d1
15 changed files with 89 additions and 112 deletions

View File

@@ -89,8 +89,8 @@ public class EnableMBeanExportTests {
assertThat(componentNamePatterns, arrayContaining("input", "inputX", "in*"));
String[] enabledCounts = TestUtils.getPropertyValue(this.configurer, "enabledCountsPatterns", String[].class);
assertThat(enabledCounts, arrayContaining("foo", "bar", "baz"));
String[] enabledStatts = TestUtils.getPropertyValue(this.configurer, "enabledStatsPatterns", String[].class);
assertThat(enabledStatts, arrayContaining("qux", "!*"));
String[] enabledStats = TestUtils.getPropertyValue(this.configurer, "enabledStatsPatterns", String[].class);
assertThat(enabledStats, arrayContaining("qux", "!*"));
assertFalse(TestUtils.getPropertyValue(this.configurer, "defaultLoggingEnabled", Boolean.class));
assertTrue(TestUtils.getPropertyValue(this.configurer, "defaultCountsEnabled", Boolean.class));
assertTrue(TestUtils.getPropertyValue(this.configurer, "defaultStatsEnabled", Boolean.class));
@@ -153,7 +153,8 @@ public class EnableMBeanExportTests {
}
public static class EnvironmentApplicationContextInitializer implements ApplicationContextInitializer<GenericApplicationContext> {
public static class EnvironmentApplicationContextInitializer
implements ApplicationContextInitializer<GenericApplicationContext> {
@Override
public void initialize(GenericApplicationContext applicationContext) {