cambios en properties
This commit is contained in:
parent
d81bc6dc9d
commit
d91e2446d5
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,3 +1,7 @@
|
||||
/bin/
|
||||
*.class
|
||||
/target/
|
||||
# Eclipse
|
||||
.classpath
|
||||
.project
|
||||
.settings/
|
||||
@ -1,6 +1,7 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/main/resources=UTF-8
|
||||
encoding//src/main/resources/application.properties=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding//src/test/resources=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -11,10 +11,10 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>4.0.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<java.version>23</java.version>
|
||||
<junit.version>6.0.3</junit.version>
|
||||
</properties>
|
||||
|
||||
@ -6,9 +6,14 @@ import org.lapaloma.mapamundi.vo.Continente;
|
||||
|
||||
public interface IContinenteDAO {
|
||||
public Continente obtenerContinentePorClave(String codigo);
|
||||
|
||||
public void actualizarContinente(Continente continente);
|
||||
|
||||
public void crearContinente(Continente continente);
|
||||
|
||||
public void borrarContinente(Continente continente);
|
||||
|
||||
public List<Continente> obtenerListaContinentes();
|
||||
|
||||
public List<Continente> obtenerContinentePorNombre(String nombre);
|
||||
}
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package org.lapaloma.mapamundi.gestores;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
* @author Isidoro Nevares Martín - IES Virgen de la Paloma
|
||||
* @date 20 feb 2026
|
||||
*
|
||||
*/
|
||||
public class GestorFicheroConfiguracion {
|
||||
private static final Properties PROPIEDADES = new Properties();
|
||||
|
||||
static {
|
||||
try (InputStream is = GestorFicheroConfiguracion.class.getClassLoader()
|
||||
.getResourceAsStream("config.properties")) {
|
||||
if (is != null) {
|
||||
PROPIEDADES.load(is);
|
||||
} else {
|
||||
throw new IllegalStateException("No se encontró application.properties en el classpath");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new IllegalStateException("Error al cargar application.properties", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtiene el valor asociado a la clave especificada.
|
||||
*
|
||||
* @param clave la clave a buscar
|
||||
* @return el valor o {@code null} si no existe
|
||||
*/
|
||||
public static String obtenerValor(String clave) {
|
||||
return PROPIEDADES.getProperty(clave);
|
||||
}
|
||||
}
|
||||
@ -2,7 +2,7 @@ package org.lapaloma.mapamundi.vo;
|
||||
|
||||
/**
|
||||
*
|
||||
* Coche: Clase de persistencia que representa un coche de un concesionario.
|
||||
* Continente: Clase de persistencia que representa un Continente de un Mapa Mundi.
|
||||
*
|
||||
* @author Isidoro Nevares Martín - IES Virgen de la Paloma
|
||||
* @date 03 marzo 2026
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
spring.datasource.url=${DB_URL}
|
||||
spring.datasource.username=${DB_USER}
|
||||
spring.datasource.password=${DB_PASSWORD}
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
# Puerto en que escucha Spring Boot
|
||||
server.port=8080
|
||||
|
||||
# Parámetros del Pool de conexiones HikariCP
|
||||
# Servicio de la base de datos.
|
||||
# Ejemplo url base dator:
|
||||
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
||||
spring.datasource.url=jdbc:mysql://${DB_HOST:192.168.1.36}:${DB_PORT:3306}/${DB_NAME:mapa_mundi}
|
||||
spring.datasource.username=${DB_USER:root}
|
||||
spring.datasource.password=${DB_PASSWORD:mysql_123}
|
||||
|
||||
# Parámetros del Pool de conexiones HikariCP
|
||||
spring.datasource.hikari.maximum-pool-size=10
|
||||
spring.datasource.hikari.minimum-idle=2
|
||||
Loading…
Reference in New Issue
Block a user