Because of the Hibernate 4.35 version and the SQL Server 2008 database used in the project. Therefore, when customizing the dialect, you need to make a difference with the old version:
Public classMysqlserverdialectextendsSqlserverdialect { PublicMysqlserverdialect () {Super(); Registerhibernatetype (1, "string"); Registerhibernatetype (-9, "string"); Registerhibernatetype (-16, "string"); Registerhibernatetype (3, "Double"); Registerhibernatetype (Types.char, standardbasictypes. String.getname ()); Registerhibernatetype (Types.nvarchar, standardbasictypes. String.getname ()); Registerhibernatetype (Types.longnvarchar, standardbasictypes. String.getname ()); Registerhibernatetype (Types.decimal, standardbasictypes. Double.getname ()); }}
Then notice that the hibernate configuration is modified. This project is to host hibernate in spring,
< Propertyname= "Hibernateproperties"> <Props> <propKey= "Hibernate.show_sql">True</prop> <propKey= "Current_session_context_class">Thread</prop> <!--<prop key= "Hibernate.dialect" >org.hibernate.dialect.SQLServerDialect</prop> - <propKey= "Hibernate.dialect">Manage.myextends.sqlserver.MySQLServerDialect</prop> </Props> </ Property>
No dialect mapping for JDBC type:-9