26 lines
728 B
Java
26 lines
728 B
Java
package org.palomafp.aadd.rmr;
|
|
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
import java.io.InputStreamReader;
|
|
import java.nio.charset.StandardCharsets;
|
|
import java.util.Properties;
|
|
|
|
public class GestorPropiedades {
|
|
|
|
private static Properties propiedades = new Properties();
|
|
|
|
static {
|
|
|
|
try (InputStream entrada = GestorPropiedades.class.getResourceAsStream("/config/application.properties")) {
|
|
propiedades.load(new InputStreamReader(entrada, StandardCharsets.ISO_8859_1));
|
|
} catch (IOException | NullPointerException e) {
|
|
System.err.println("Error al cargar el archivo de propiedades: " + e.getMessage());
|
|
}
|
|
}
|
|
|
|
public static String get(String clave) {
|
|
return propiedades.getProperty(clave);
|
|
}
|
|
}
|