解决Cannot invoke “java.sql.Connection.prepareStatement(String)“because “this.conn“ is null 把mysql-connector-java.jar包从lib文件夹里面删除,重新复制一份过来,重启服务器即可