日期:2014-05-16 浏览次数:20916 次
public class MySQL5LocalDialect extends MySQL5InnoDBDialect{ //继承链接mysql的类 public MySQL5LocalDialect() { super(); registerFunction("convert", new SQLFunctionTemplate(Hibernate.STRING, "convert(?1 using ?2)")); } }
<prop key="hibernate.dialect"> com.***.util.MySQL5LocalDialect <!--导入上面咱自定义的类--> </prop>