-
Notifications
You must be signed in to change notification settings - Fork 1
feat(SpringBoot4): bump to spring boot 4 and gradle 8.14 #1123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Coverage Report for frontend
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||
|
|
||
| val isSentryEnabled: String? = ctx.environment.getProperty("sentry.enabled") | ||
| val sentryDsn: String? = System.getenv("SENTRY_DSN") | ||
|
|
||
| if (isSentryEnabled == "true") { | ||
| Sentry.init { options -> | ||
| options.environment = System.getenv("ENV_PROFILE") | ||
| options.dsn = sentryDsn | ||
| options.proxy = SentryOptions.Proxy( | ||
| System.getenv("PROXY_HOST"), | ||
| System.getenv("PROXY_PORT"), | ||
| ) | ||
| options.tracesSampleRate = 1.0 | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
J'ai viré ce code là.
Il suffit de mettre ces propriétés dans application-propertioes.yml et ca s'occupe de tout tout seul
| fun jsonMapperBuilderCustomizer(): JsonMapperBuilderCustomizer { | ||
| return JsonMapperBuilderCustomizer { builder -> | ||
| builder.addModule(KotlinModule.Builder().build()) | ||
| // builder.addModule(JavaTimeModule()) | ||
|
|
||
| // Don't throw on unrecognised fields | ||
| // Very common for us as we're not always notified by the Monitor apps about changes in their modelds | ||
| disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) | ||
| // If you wrote your own Geometry module/serializers, register it here: | ||
| // builder.addModule(JtsM) | ||
|
|
||
| // Include null values in serialization (equivalent to gson.serializeNulls()) | ||
| setSerializationInclusion(com.fasterxml.jackson.annotation.JsonInclude.Include.ALWAYS) | ||
| builder.disable(DateTimeFeature.WRITE_DATES_AS_TIMESTAMPS) | ||
| builder.disable(DateTimeFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE) | ||
| builder.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) | ||
|
|
||
| propertyNamingStrategy = PropertyNamingStrategies.LOWER_CAMEL_CASE | ||
| // builder.serializationInclusion(JsonInclude.Include.ALWAYS) | ||
| builder.propertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Donc la diff dans la config de la serialization json :
- les dates sont désormais incluses par défaut dans Jackson3
- les geometries, le plugin est plus à jour donc j'ai dû me taper le code à la main -_-
| @param:JsonProperty("geom") | ||
| @param:JsonDeserialize(using = JtsGeometryDeserializer::class) | ||
| @get:JsonSerialize(using = JtsGeometrySerializer::class) | ||
| open val geom: Geometry? = null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Faut répéter ça partout pour ce champ maintenant, il faut spécifier quels serializer/deserializer et dans le cas de Geometry, voilà lesquels il faut utiliser
| @param:JsonProperty("geom") | ||
| @param:JsonDeserialize(using = JtsMultiPolygonDeserializer::class) | ||
| @get:JsonSerialize(using = JtsGeometrySerializer::class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mais parfois, c'est des MultiPolygon donc le deserializer en MultiPolygon mais le serializewr en Geometry, c'est suffisant
| private val getFishActionsByMissionId: GetFishActionsByMissionId, | ||
| private val attachControlsToActionControl: AttachControlsToActionControl, | ||
| private val mapper: ObjectMapper | ||
| private val mapper: JsonMapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A la place d'ObjectMapper pour le JSON, Jackson3 a maintenant une classe dédiée qui est JsonMapper
eb85d34 to
27b143c
Compare
|
|
No description provided.