package com.qianwen.core.launch.utils; import java.util.Properties; import org.springframework.util.StringUtils; public class PropsUtil { public static void setProperty(Properties props, String key, String value) { if (StringUtils.isEmpty(props.getProperty(key))) { if (System.getenv().containsKey(key)) { props.setProperty(key, System.getenv(key)); } else { props.setProperty(key, value); } } } }