This commit is contained in:
avelino
2026-11-10 20:11:10 +01:00
commit 0b0ce82cc0
63 changed files with 1223 additions and 0 deletions
@@ -0,0 +1,24 @@
package eu.esa.gemis.anp.conexion;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
public class ConexionDB {
public static Connection getConexion() throws SQLException {
try {
Class.forName(ConfigConexion.get("db.driver"));
return DriverManager.getConnection(
ConfigConexion.get("db.url"),
ConfigConexion.get("db.user"),
ConfigConexion.get("db.password")
);
} catch (ClassNotFoundException e) {
throw new SQLException("No se ha encontrado el driver de la base de datos", e);
}
}
}