https://kotlinlang.org logo
Title
u

user

06/22/2022, 7:11 AM
Avoid model duplicates in Spring-boot for different dataSources I'm using Spring-Boot with Kotlin and try to save a "Student" object into 2 different databases. (PostgreSQL and Redis) To achieve this I created 2 Student models, because Postgres and Redis need different annotations. @Entity @Table(name = "student") data class StudentPostgres( @Id var id: Int? = null, var name: String? = null, var gender: Gender? = null, var grade: Int? = null ) { enum class Gender { MALE, FEMALE } } @RedisHash("Student") data class...