Skip to content

Commit

Permalink
chore(deps): bump the minor group in /backend with 2 updates (#3286)
Browse files Browse the repository at this point in the history
* chore(deps): bump the minor group in /backend with 2 updates

Bumps the minor group in /backend with 2 updates: [org.springdoc:springdoc-openapi-starter-webmvc-ui](https://github.com/springdoc/springdoc-openapi) and [org.springframework.boot](https://github.com/spring-projects/spring-boot).


Updates `org.springdoc:springdoc-openapi-starter-webmvc-ui` from 2.6.0 to 2.7.0
- [Release notes](https://github.com/springdoc/springdoc-openapi/releases)
- [Changelog](https://github.com/springdoc/springdoc-openapi/blob/main/CHANGELOG.md)
- [Commits](springdoc/springdoc-openapi@v2.6.0...v2.7.0)

Updates `org.springframework.boot` from 3.3.5 to 3.4.0
- [Release notes](https://github.com/spring-projects/spring-boot/releases)
- [Commits](spring-projects/spring-boot@v3.3.5...v3.4.0)

---
updated-dependencies:
- dependency-name: org.springdoc:springdoc-openapi-starter-webmvc-ui
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor
- dependency-name: org.springframework.boot
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix(backend): add LocalDate serialization module

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Chaoran Chen <[email protected]>
  • Loading branch information
dependabot[bot] and chaoran-chen authored Nov 25, 2024
1 parent 7e7533b commit cb053ce
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent

plugins {
id 'org.springframework.boot' version '3.3.5'
id 'org.springframework.boot' version '3.4.0'
id 'io.spring.dependency-management' version '1.1.6'
// If kotlin version bumped, check if gradle version can be bumped as well
// Check here: https://kotlinlang.org/docs/gradle-configure-project.html#apply-the-plugin
Expand Down Expand Up @@ -36,7 +36,7 @@ dependencies {
implementation "io.github.microutils:kotlin-logging-jvm:3.0.5"
implementation "org.postgresql:postgresql:42.7.4"
implementation "org.apache.commons:commons-csv:1.12.0"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.6.0"
implementation "org.springdoc:springdoc-openapi-starter-webmvc-ui:2.7.0"
implementation "org.flywaydb:flyway-database-postgresql:10.21.0"
implementation "org.jetbrains.exposed:exposed-spring-boot-starter:0.56.0"
implementation "org.jetbrains.exposed:exposed-jdbc:0.56.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.loculus.backend.utils

import com.fasterxml.jackson.core.JsonGenerator
import com.fasterxml.jackson.core.JsonParser
import com.fasterxml.jackson.databind.DeserializationContext
import com.fasterxml.jackson.databind.JsonDeserializer
import com.fasterxml.jackson.databind.JsonSerializer
import com.fasterxml.jackson.databind.SerializerProvider
import com.fasterxml.jackson.databind.module.SimpleModule
import kotlinx.datetime.LocalDate
import org.springframework.context.annotation.Configuration

@Configuration
class LocalDateJacksonModule : SimpleModule() {
init {
addSerializer(LocalDate::class.java, LocalDateSerializer())
addDeserializer(LocalDate::class.java, LocalDateDeserializer())
}
}

class LocalDateSerializer : JsonSerializer<LocalDate>() {
override fun serialize(value: LocalDate, gen: JsonGenerator, serializers: SerializerProvider) {
gen.writeString(value.toString())
}
}

class LocalDateDeserializer : JsonDeserializer<LocalDate>() {
override fun deserialize(p: JsonParser, ctxt: DeserializationContext): LocalDate = LocalDate.parse(p.text)
}

0 comments on commit cb053ce

Please sign in to comment.