Skip to content

Commit

Permalink
chore: objectmapper
Browse files Browse the repository at this point in the history
  • Loading branch information
helehar committed Nov 22, 2024
1 parent 375e40a commit 62f493e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package no.nav.sykdig.digitalisering.papirsykmelding

import com.fasterxml.jackson.databind.ObjectMapper
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
import net.logstash.logback.argument.StructuredArguments
Expand Down Expand Up @@ -36,6 +37,7 @@ import no.nav.sykdig.securelog
import no.nav.sykdig.utils.getLocalDateTime
import no.nav.sykdig.utils.isWhitelisted
import no.nav.sykdig.utils.mapsmRegistreringManuelltTilFellesformat
import okio.Utf8
import org.apache.kafka.clients.producer.KafkaProducer
import org.apache.kafka.clients.producer.ProducerRecord
import org.springframework.http.HttpStatus
Expand Down Expand Up @@ -174,7 +176,9 @@ class NasjonalSykmeldingService(
}
securelog.info("receivedSykmelding vi prøver å lagre: ${receivedSykmelding}")
val dao = mapToDao(receivedSykmelding, veileder)
securelog.info("mapped receivedSykmeldingToDao ${dao.sykmelding}")
val objectMapper = jacksonObjectMapper()
objectMapper.registerModules(JavaTimeModule())
securelog.info("mapped receivedSykmeldingToDao ${objectMapper.writeValueAsString(dao)}")
nasjonalSykmeldingRepository.save(dao)
log.info("Sykmelding saved to db, nasjonal_sykmelding table {}", receivedSykmelding.sykmelding.id)
}
Expand Down

0 comments on commit 62f493e

Please sign in to comment.