我尝试将以下内容与 spring-data-jdbc 和 postgres 驱动程序(kotlin)一起使用,
data class MyEntity(
val id: UUID,
val content: String
)
Run Code Online (Sandbox Code Playgroud)
使用字符串失败并出现以下错误,
org.postgresql.util.PSQLException: ERROR: column "content" is of type jsonb but expression is of type character varying
Hint: You will need to rewrite or cast the expression.
Position: 31
Run Code Online (Sandbox Code Playgroud)
我不确定如何使用 String -> jsonb 转换器