URL的数据库连接名后面出多了个空格,及test后多了造成异常 private static final String URL="jdbc:mysql://localhost:3306/test ? characterEncoding=UTF-8";