Actualizado error
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
continente.ruta.fichero=D:/Documentos/DAM 2/AC - Acceso a Datos/Practicas/aadd/fic07/informacion_continentes.csv
|
||||
continente.ruta.fichero=D:/Documentos/DAM 2/AC - Acceso a Datos/Practicas/aadd/fic09/informacion_continentes.csv
|
||||
continente.csv.separador=#
|
||||
pais.ruta.fichero=D:/Documentos/DAM 2/AC - Acceso a Datos/Practicas/aadd/fic09/informacion_paises.txt
|
||||
pais.txt.separador=,
|
||||
@@ -1,12 +1,12 @@
|
||||
package org.palomafp.aadd.smmb.gestores;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
public class GestorConfiguracion {
|
||||
|
||||
private static final String RUTA_FICHERO_CONFIGURACION = "config/application.properties";
|
||||
private static final String RUTA_FICHERO_CONFIGURACION = "application.properties";
|
||||
private static final Properties PROPIEDADES = new Properties();
|
||||
|
||||
|
||||
@@ -17,7 +17,15 @@ public class GestorConfiguracion {
|
||||
|
||||
//Esto se ejecuta una sola vez la primera vez que alguien llama a la clase.Es la recepcionista leyendo la libreta al llegar a la ofi
|
||||
static {
|
||||
try (FileInputStream is = new FileInputStream(RUTA_FICHERO_CONFIGURACION)){
|
||||
try (InputStream is = GestorConfiguracion.class.getClassLoader()
|
||||
.getResourceAsStream(RUTA_FICHERO_CONFIGURACION)){
|
||||
|
||||
|
||||
if (is == null) {
|
||||
throw new RuntimeException(
|
||||
"No se ha encontrado el fichero de configuración: " + RUTA_FICHERO_CONFIGURACION);
|
||||
}
|
||||
|
||||
|
||||
PROPIEDADES.load(is);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user