-
Hibernate-Spatial를 spring.jpa.properties.hibernate.dialect로 연결할 때 (+deprecated)🐳Dev/Dev 2022. 7. 10. 16:16
많은 블로그들을 따라 hibernate-spatial의 dialect를 연결하는데, 잘 안되서 공식 문서를 뒤져 보았다
뒤적뒤적
그리고 알아낸 사실
Hibernate 버전 5에서는 사용되던 spatial.dialect가 버전 6에서는 더 이상 사용되지 않는다는 것!
버전 5.6 버전 6.1 A SpatialDialect is no longer required. Use the standard Dialect for this database.
대신 그냥 PostgreSQLDialect을 사용하면 된다! 다른 DB도 마찬가지 인듯 하다.
역시 공식 문서가 최고야
PostgreSQLDialect (Hibernate JavaDocs)
Initialize the given registry with any dialect-specific functions. Support for certain SQL functions is required, and if the database does not support a required function, then the dialect must define a way to emulate it. These required functions include t
docs.jboss.org
+ 추가
이후 테스트 컨테이너를 돌리는데, 5.6.9 버전에서 아래 두 구문만을 다르게 하여 테스트를 진행해 보았다.
spring.jpa.properties.hibernate.dialect=org.hibernate.spatial.dialect.postgis.PostgisPG10Dialect
spring.jpa.properties.hibernate.dialect=org.hibernate.spatial.dialect.postgis.PostgisDialect
근데 둘 다 되는 것이다!! (이런)
그래서 deprecated의 의미를 다시 살펴보니,
"중요도가 떨어져 더 이상 사용되지 않고 앞으로는 사라지게 될"
이라는 의미를 가진다고 한다!
그래서 이후에 사라지게 될 것이며, 아직은 사용이 가능한가 보다!
deprecated / obsolete 의미.
deprecated, obsolete 이 두 단어는 뭘까? 유니티 작업을 하면서 종종보는 단어는 deprecated 였다. 앞으로 지원되지 않을것이므로 사용을 자제 해달라는 의미로 씌여진것으로 안다. 그렇다면 완전히 없
leeusin.tistory.com
그래도 뭐 안쓰는 게 좋겠지? 끝
'🐳Dev > Dev' 카테고리의 다른 글
Kotlin 코루틴(Coroutines)의 개념과 기본 사용법 (0) 2022.07.16 PostGIS과 Hibernate-Spatial로 공간 데이터를 다루기 (0) 2022.07.16 Kotlin 공식 페이지의 Play Example 번역하기 (+공부용) (0) 2022.06.26 [Spring] Spring 웹 개발 기초 (0) 2022.04.25 [Network] REST와 REST API (0) 2022.04.22