(动态改变数据源遇到的问题)sqlserver2012:No Dialect mapping for JDBC type: -9解决方案
public class MySQLServerDialect extends SQLServerDialect { public MySQLServerDialect() { 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()); } }