发生异常:
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary
原因:
MySQL8.0.X是高版本,低版本是可以
解决:
private String driver="com.mysql.cj.jdbc.Driver";