报错:java.lang.StringIndexOutOfBoundsException: String index out of range: 0(后面省略) 原因是因为数据库里面char类型字段是空格的,不是有值或者null。