Oracel数据库迁移到DB2后,有关方言的报错解决方案

--------------------------------------------------保存文件名为Db2Dialect.java---------------------------------------------------

package xxx.xxx.xxx.xxx;
import java.sql.Types; 

import org.hibernate.Hibernate; 
import org.hibernate.dialect.DB2Dialect;; 

public class Db2Dialect extends DB2Dialect { 
 
    @SuppressWarnings("deprecation")
 public Db2Dialect() { 
        super(); 
        registerHibernateType(Types.OTHER, Hibernate.DOUBLE.getName());
    } 

--------------------------------------------配置方言(pom.xml文件中)--------------------------------------------------------

<jdbc.driver.dialect>xxx.xxx.xxx.xxx.Db2Dialect</jdbc.driver.dialect>

你可能感兴趣的:(Oracle迁移到DB2,DB2方言)