|
@@ -773,12 +773,13 @@ public class ApplicationContextHolder implements ApplicationContextAware, Proper
|
|
|
value = (T) getProperty(key, Range::parse);
|
|
|
} else if (type == Paging.class) {
|
|
|
value = (T) getProperty(key, Paging::parse);
|
|
|
- } else if (type == Period.class) {
|
|
|
- value = (T) getProperty(key, Period::parse);
|
|
|
} else if (type == Duration.class) {
|
|
|
value = (T) getProperty(key, Duration::parse);
|
|
|
} else if (type == Region.class) {
|
|
|
value = (T) getProperty(key, code -> Region.of(Integer.valueOf(code)));
|
|
|
+ } else if (type == Period.class) {
|
|
|
+ Environment environment = getEnvironment(false);
|
|
|
+ value = environment == null ? null : (T) StringUtils.ifEmpty(environment.getProperty(key), Period::parse);
|
|
|
} else {
|
|
|
value = getProperty(key, json -> JacksonUtils.deserialize(json, type));
|
|
|
}
|