Java org.hibernate.dialect.PostgreSQLDialect 已弃用
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33725589/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
org.hibernate.dialect.PostgreSQLDialect is deprecated
提问by Shota
I've just added configuration for Hibernate to my application and IntelliJ Idea is complaining that this dialect is deprecated:
我刚刚在我的应用程序中添加了 Hibernate 的配置,IntelliJ Idea 抱怨这种方言已被弃用:
<property name="hibernate.dialect">
org.hibernate.dialect.PostgreSQLDialect
</property>
Does not seem to be a clear solution on the internet, any suggestions?
互联网上似乎没有明确的解决方案,有什么建议吗?
采纳答案by Tunaki
You need to use org.hibernate.dialect.PostgreSQL82Dialect
instead.
你需要org.hibernate.dialect.PostgreSQL82Dialect
改用。
This is documented in PostgreSQLDialect
Javadoc:
这在PostgreSQLDialect
Javadoc 中有记录:
Deprecated.
use PostgreSQL82Dialect instead
已弃用。
改用 PostgreSQL82Dialect
Note however that you should use the dialect that best matches the PostgreSQL JDBC driver you are using (list here). For example, if you are using PostgreSQL 9.4 or later, use PostgreSQL94Dialect
instead.
但是请注意,您应该使用与您正在使用的 PostgreSQL JDBC 驱动程序最匹配的方言(在此处列出)。例如,如果您使用的是 PostgreSQL 9.4 或更高版本,请PostgreSQL94Dialect
改用。