JPA
[JPA] Entity Map 을 Json 으로 Converter
SO-BBANG
2022. 2. 7. 11:35
Jpa Entity Column Map을 Json 타입으로 컨버팅하여 넣기
@TypeDef(name = "json", typeClass = JsonType::class) // Entity class 상단에 설정
@Type(type = "json") // column 설정
참고사이트
https://blog.leocat.kr/notes/2020/09/01/hibernate-mapping-json-type-to-java-map
[Hibernate] Java Map 으로 json 타입 매핑하기
간혹 entity에 json 필드를 넣어야 할 때가 있다. child가 없는 1차원의 데이터라면 Java Map으로 사용하면 편하기 때문에 Map으로 변환하고 싶을 때는 이렇게 하면 된다.
blog.leocat.kr