hibernet 报错

java.lang.StringIndexOutOfBoundsException: String index out of range: 0

 

处理方法  数据表字段为char导致,修改为VARCHAR.

建表时不要使用char类型,为null就会报以上错误