public class ResourcesManager {
private Properties properties;
public ResourcesManager(){
this.properties = new Properties();
this.loadResources();
}
private void loadResources(){
try {
this.properties.load(ResourcesManager.class.getResourceAsStream("/Archivo.properties"));
} catch (IOException e) {
e.printStackTrace();
}
}
public String getResource(String resourceName){
return this.properties.getProperty(resourceName);
}
}
Espero que sea util. Saludos,
No hay comentarios:
Publicar un comentario