@Test public void testResolve() { MockEnvironment environment = new MockEnvironment(); PropertiesPlaceholderResolver resolver = new PropertiesPlaceholderResolver( environment); Map properties = new HashMap(); properties.put("my.name", "${my.name}"); properties.put("my.age", 18); environment.setProperty("my.name", "mercyblitz"); environment.setProperty("my.age", "18"); Properties resolvedProperties = resolver.resolve(properties); Assert.assertEquals(resolvedProperties.get("my.name"), "mercyblitz"); Assert.assertNull(resolvedProperties.get("my.age")); }
public Properties resolve(Annotation annotation) { Map<String, Object> attributes = AnnotationUtils .getAnnotationAttributes(annotation); return resolve(attributes); }
PropertiesPlaceholderResolver { public Properties resolve(Annotation annotation) { Map<String, Object> attributes = AnnotationUtils .getAnnotationAttributes(annotation); return resolve(attributes); } }
PropertiesPlaceholderResolver { public Properties resolve(Annotation annotation) { Map<String, Object> attributes = AnnotationUtils .getAnnotationAttributes(annotation); return resolve(attributes); } PropertiesPlaceholderResolver(PropertyResolver propertyResolver); }
PropertiesPlaceholderResolver { public Properties resolve(Annotation annotation) { Map<String, Object> attributes = AnnotationUtils .getAnnotationAttributes(annotation); return resolve(attributes); } PropertiesPlaceholderResolver(PropertyResolver propertyResolver); Properties resolve(Annotation annotation); Properties resolve(Map<?, ?> properties); }
PropertiesPlaceholderResolver { public Properties resolve(Annotation annotation) { Map<String, Object> attributes = AnnotationUtils .getAnnotationAttributes(annotation); return resolve(attributes); } PropertiesPlaceholderResolver(PropertyResolver propertyResolver); Properties resolve(Annotation annotation); Properties resolve(Map<?, ?> properties);  }