tillkuhn / angkor

🌅(Mostly) educational app to manage favorite locations and recipes. Techstack Frontend: Angular 16 (TypeScript, Mapbox GL), Backend: Spring Boot 3.2 (JDK 21, Kotlin, PostgreSQL, Kafka, Cognito), Go Microservices, Docker, Terraform managed AWS Infrastructure
Apache License 2.0
16 stars 4 forks source link

Add support for Spring Boot 3.2, Hibernate >= 6.3, Gradle 8.5 and Java 21 #592

Closed tillkuhn closed 6 months ago

tillkuhn commented 8 months ago

Hibernate Enum Issue

PostgreSQLEnumType has been deprecated in hypersistence-utils-hibernate-62 and eventually removed in hypersistence-utils-hibernate-63 in favor of Hibernate's new PostgreSQLEnumJdbcType

Solution This should work with Hibernate 6.3:

@Enumerated(EnumType.STRING)
@Column(columnDefinition = "level")
@JdbcType(PostgreSQLEnumJdbcType::class) // from package org.hibernate.dialect
var level: Area_Level = Area_Level.COUNTRY,

As opposed to former PostgreSQLEnumType, type value was not translated from CamelCase to under_score case automatically, so I had to rename the enum class, but there's hopefully a better way to control this.

Related issue:

Hibernate 6.4 issue

Solution: Downgrade to Spring 3.2.0 (comes with Hibernate 6.3 and not 6.4) until this issue is fixed

Wiremock Issue

https://github.com/wiremock/wiremock/issues/2395

Solution: Use wiremock-standalone

Flyway unsupported class file major version 63 issue

https://github.com/react-native-community/cli/issues/1719

Solution: Update to gradle 8.5 and java 21

tillkuhn commented 6 months ago

update from 3.2.0 to 3.2.2 is still pending Hibernate: HHH-17588 UserTypes cannot be resolved to BasicPluralType https://github.com/vladmihalcea/hypersistence-utils/issues/685

tillkuhn commented 6 months ago

spring boot 3.2.2. is OK now, since Hibernate issue was fixed / workarounded with https://github.com/vladmihalcea/hypersistence-utils/commit/2e3098af58aa983a36d248f2421e67e459af1b7a ( "io.hypersistence:hypersistence-utils-hibernate-63", version = "3.7.2")