All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dream.first.core.DFApplication Maven / Gradle / Ivy

There is a newer version: 2.1.0
Show newest version
/**
 * 
 */
package dream.first.core;

import java.util.HashMap;
import java.util.Map;

/**
 * 应用属性配置。
 * 
 * 整个应用在运行时共享的属性。
 * 
 * @since 1.0.0
 */
public final class DFApplication {

	private static final Map PROPERTIES = new HashMap();

	private DFApplication() {
	}

	public static final String getProperty(String key) {
		return PROPERTIES.get(key);
	}

	public static final String getProperty(String key, String defaultValue) {
		return PROPERTIES.getOrDefault(key, defaultValue);
	}

	public static final void setProperty(String key, String value) {
		PROPERTIES.put(key, value);
	}

	public static final Map getProperties() {
		return PROPERTIES;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy