32 lines
885 B
Java
32 lines
885 B
Java
package org.palomafp.aadd.jx.config;
|
|
|
|
import java.io.FileInputStream;
|
|
import java.io.IOException;
|
|
import java.util.Properties;
|
|
|
|
public class ConfigManager {
|
|
|
|
private Properties properties;
|
|
|
|
public ConfigManager() {
|
|
|
|
properties = new Properties();
|
|
|
|
try (FileInputStream fis = new FileInputStream("config/application.properties")) {
|
|
|
|
properties.load(fis);
|
|
|
|
} catch (IOException e) {
|
|
System.err.println("Error al cargar config/application.properties: " + e.getMessage());
|
|
}
|
|
}
|
|
|
|
public String getRutaFicheroContinente() {
|
|
|
|
return properties.getProperty("ruta.fichero.continente", "C:\\Users\\lauuj\\aadd\\fic07\\informacion_continentes.csv");
|
|
}
|
|
|
|
public String getSeparadorCsv() {
|
|
return properties.getProperty("separador.csv.continente", "#");
|
|
}
|
|
} |