Skip to content

Commit

Permalink
Correzione errori deploy su tomcat (#5)
Browse files Browse the repository at this point in the history
* Aggiornato stack applicativo a java21.
Risolte segnalazioni sonar.
Risolte vulnerabilita' librerie

* Estratte costanti per pattern delle date.

* Aggiunto log con logback

* Eliminata esecuzione test.

* Corretti errori deploy su tomcat.
Corretti livelli di log operazioni web controller.
  • Loading branch information
pintorig authored Feb 6, 2025
1 parent 74b49f7 commit 7b67781
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/main/java/it/govpay/gde/controller/GdeController.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public GdeController(EventoRepository eventoRepository, NuovoEventoMapperImpl nu

@Override
public ResponseEntity<Void> addEvento(@Valid NuovoEvento nuovoEvento) {
this.logger.debug("Salvataggio evento: {}", nuovoEvento);
this.logger.info("Salvataggio evento: {}", nuovoEvento);

EventoEntity entity = this.nuovoEventoMapperImpl.nuovoEventoToEventoEntity(nuovoEvento);

Expand All @@ -78,12 +78,12 @@ public ResponseEntity<ListaEventi> findEventi(Long offset,
EsitoEvento esito, RuoloEvento ruolo, String sottotipoEvento, String tipoEvento,
ComponenteEvento componente, Integer severitaDa, Integer severitaA) {

this.logger.debug("Ricerca eventi...");
this.logger.info("Ricerca eventi...");

Specification<EventoEntity> spec = creaFiltriDiRicercaDate(dataDa, dataA);

spec = creaFiltriDiRicercaEvento(spec, categoriaEvento, esito, ruolo, sottotipoEvento, tipoEvento, componente);

spec = creaFiltriDiRicercaDatiPendenza(spec, idDominio, iuv, ccp, idA2A, idPendenza);

spec = creaFiltriDiRicercaSeverita(spec, severitaDa, severitaA);
Expand All @@ -103,7 +103,7 @@ public ResponseEntity<ListaEventi> findEventi(Long offset,
ret.addItemsItem(this.eventoMapperImpl.eventoEntityToEvento(user));
}

this.logger.debug("Ricerca eventi completata");
this.logger.info("Ricerca eventi completata");

return ResponseEntity.ok(ret);
}
Expand Down Expand Up @@ -189,13 +189,13 @@ private Specification<EventoEntity> creaFiltriDiRicercaSeverita(Specification<Ev

@Override
public ResponseEntity<Evento> getEventoById(Long id) {
this.logger.debug("Lettura evento: {}", id);
this.logger.info("Lettura evento: {}", id);

ResponseEntity<Evento> res = this.eventoRepository.findById(id).map(this.eventoMapperImpl::eventoEntityToEvento)
.map(ResponseEntity::ok)
.orElseThrow(ResourceNotFoundException::new);

this.logger.debug("Lettura evento completata.");
this.logger.info("Lettura evento completata.");
return res;
}
}
5 changes: 3 additions & 2 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ management.health.readinessState.enabled=true

# Configurazione DB
#spring.datasource.jndiName=govpay
#spring.datasource.jndiName=java:comp/env/it.govpay.datasource
spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/govpay
spring.datasource.driverClassName=org.postgresql.Driver
spring.datasource.username=govpay
spring.datasource.password=govpay

spring.jpa.database-platform=org.hibernate.dialect.PostgreSQL10Dialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQL10Dialect
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

# Solo per HSQL
# Console
Expand Down

0 comments on commit 7b67781

Please sign in to comment.